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 explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What is the difference between union and structure in c?
Is c is a low level language?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What are types of functions?
How would you rename a function in C?
Tell me what are bitwise shift operators?
What is a char c?
Explain how do you sort filenames in a directory?
c language interview questions & answer
What are the application of void data type in c?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What is wrong with this program statement? void = 10;
Explain what is a const pointer?
Discuss the function of conditional operator, size of operator and comma operator with examples.