Header File

Why should we use header file?

Questions by sandip06

Showing Answers 1 - 6 of 6 Answers

for example...

we should include the header file (Ex: #include<stdio.h>) before the main function. because if we are going to use following function in our program we should  include header file bcoz this header file contains following  function definitions.
 
Ex: 1. printf();
       2. scanf();

       3. getcahr() and putchar() etc....

Thanks
Kannan R

#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c,d;
clrscr();
d=0;
printf("enter a number");
scanf("%d",&a);
c=a;
while(a>0)
b=a%10;
d=d+(b*b*b);
a=a%10;
if(c==d)
printf("amstrong");
else
printf("not amstrong");
getch();
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions