Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program

Answer Posted / devvv

main function is a basic in c programming
language.generally main is written first.but when executing
modular programs ,to avoid prototyping, other functions
are written first.so main can be written anywhere in a
program.but atleast one of the other functions must be
declared in main.

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do string constants represent numerical values?

1139


What is unsigned int in c?

745


What is const volatile variable in c?

787


What are the advantages of using Unions?

849


Do variables need to be initialized?

807


How can a string be converted to a number?

751


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

859


What is c mainly used for?

819


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

816


How do you construct an increment statement or decrement statement in C?

993


What is null in c?

754


Once I have used freopen, how can I get the original stdout (or stdin) back?

833


Why is c platform dependent?

805


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

937


Explain bit masking in c?

903