Saturday, June 4, 2011

C Program without a Header File

It is possible to write a c program without using a header file .

For this we have to do the following :
We will first have to save the program with the extension .c  . eg: wht.c
After this execute the file. The compiler will itself include the header files.
This will work in the case of C++ also.

Example Problem:
void main()
int a,b,c;
printf("Enter the values of a and b ");
scanf("%d %d",&a,&b);
c= a+b;
printf("The value is %d",c);

After writing the code , save with .c extension and then execute. 


  1. it does not work....compiler give some prototype error

  2. its working in turbo c compiler good one but why is this happeneing

  3. Appreciation for nice Updates, I found something new and folks can get useful info about BEST ONLINE TRAINING