How many passes does a c compiler do? -
int main() { int res; funcadd(10,20); } int funcadd(int a,int b) { homecoming a+b; }
in above program, main not recognize funcadd() since defined after main , there no declaration in beginning. if c compiler did 2 passes of programme must not issue since know function funcadd() defined in sec pass. mean c 1 pass compiler? kindly clarify doubt.
the c language doesn't specify how many passes compiler must take. however, /does/ specify functions must declared before used. hence, code invalid, regardless of how many passes compiler makes.
c
No comments:
Post a Comment