274 views
0 votes
0 votes
1:Where I find printf body in turbo c

I know the prototype defined in stdio.h header file but body is not there?

2:why without include header file program successfully compiled and run?

1 Answer

Best answer
1 votes
1 votes
1.Header files declare function prototypes not the function itself. They contain declarations of functions that are defined (along with their body) in  other C programs.
Please make note of the difference between declaration and definition.

2. You can always run a C program without a header file if there are no function calls made in your program that need that header file.

Header files contain function declarations , so if no function is used you do not need the header file.

If no printf is used , you do not need to include stdio.h in your program.
selected by

Related questions

2 votes
2 votes
3 answers
1
1 votes
1 votes
2 answers
3
Parimal Paritosh asked Feb 6, 2019
932 views
int main(){float sum, i = 1.0, j = 2.0;while (i/j 0.0625){j = j + j;printf("%f", i+j);}}The number of times printf statement is executed is:
0 votes
0 votes
1 answer
4
saumya mishra asked Dec 12, 2018
422 views
What is the output??