Why preprocessor should come before source code?

Answers were Sorted based on User's Feedback



Why preprocessor should come before source code? ..

Answer / bhaskar.mantrala

why because when we compile a program all input and output
statements will be replaced by thier own codes present in
the directives...so all these things would be done by
preprocessor(pre processing) (#).....

Is This Answer Correct ?    6 Yes 2 No

Why preprocessor should come before source code? ..

Answer / ashu_deepu

because there are codes which we use in the main program

need to be defined before their use.
or we can say we do so to have the prototype declaration
before their use.
eg.printf,scanf etc.

preprocessor include the header file
like stdio,conio etc.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Interview Questions

Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV

5 Answers   Accenture,


What is structure padding in c?

0 Answers  


what is the output of below int n=10; (n++)++; printf("%d",n);

3 Answers  


Why shouldn’t I start variable names with underscores?

0 Answers  


write a method for an array in which it can display the largest n next largest value.

1 Answers   Value Labs,






Explain what is the difference between a string and an array?

0 Answers  


Why the below program throughs error during compilation? #include<stdio.h> #include<conio.h> enum { ZERO, ONE, TWO, }; main() { printf("%d",&TWO); getch(); }

2 Answers  


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

0 Answers  


Predict the output or error(s) for the following: 25. main() { printf("%p",main); }

3 Answers   Google, ME,


What are data types in c language?

0 Answers  


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

2 Answers   Cap Gemini, HCL,


b) 4 c) 6 d) 7 32. Any C program a) must contain at least one function b) need not contain ant function c) needs input data d) none of the above 33. Using goto inside for loop is equivalent to using a) continue b) break c) return d)none of the above 34. The program fragment int a=5, b=2; printf(“%d”,a+++++b); a) prints 7 b)prints 8 c) prints 9 d)none of the above 35. printf(“ab” , “cd”,”ef”); prints a) ab abcdef c) abcdef, followed by garbage value d) none of the above 36. Consider the following program segment. i=6720; j=4; while((i%j)==0) { i=i/j; j=j+1; } On termination j will have the value a) 4 b) 8 c) 9 d) 6720

1 Answers   HCL,


Categories