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
Answers were Sorted based on User's Feedback
Answer / swamy s t
Answer is D. any where in the program.
No matter whereever it is because the program should
starts or begins from main() function only.
Is This Answer Correct ? | 30 Yes | 3 No |
Answer / manju
d.any where in the program
because the execution of a program begins from the main
function.it doesn't consider the place where the main
function written.
Is This Answer Correct ? | 16 Yes | 2 No |
Answer / 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 |
d.any where in the program. but it should declare after the
declaration of veriable where it starts execution of the
program
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / sudipta panja
(d)--execution starts from main,i.e. compiler starts
compiling from main but the posn of main is not fixed.it can
be anywhere.
Is This Answer Correct ? | 3 Yes | 0 No |
what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
we have to use realloc only after malloc or calloc ? or we can use initially with out depending on whether we are using malloc or calloc in our program ?
What is the benefit of using an enum rather than a #define constant?
Output for following program using for loop only * * * * * * * * * * * * * * *
What is this infamous null pointer, anyway?
write a “Hello World” program in “c” without using a semicolon?
What does 3 periods mean in texting?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
Can you pass an entire structure to functions?
how to find the largest element of array without using relational operater?
Write a program to print distinct words in an input along with their count in input in decreasing order of their count..
what is the value of b if a=5; b=++a + ++a
31 Answers Infosys, TCS, Tech Mahindra,