Whether there can be main inside another main?If so how does
it work?

Answer Posted / divyansh

main marks the beginning of a program, 2 direct mains can't
be there as it will make the compiler dumb!(literally),in
this case it will give an error, or an infinite loop
operation will be executed.

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

int i=10; printf("%d %d %d", i, i=20, i);

1002


How can I avoid the abort, retry, fail messages?

647


What math functions are available for integers? For floating point?

614


What is a union?

603


What is getch?

624






Explain what is a const pointer?

632


Explain what are header files and explain what are its uses in c programming?

621


How can a program be made to print the line number where an error occurs?

640


Explain how do you generate random numbers in c?

614


Can we declare function inside main?

560


What extern c means?

528


Why we not create function inside function.

1742


What is the role of this pointer?

540


What is the role of && operator in a program code?

562


Can you add pointers together? Why would you?

634