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

Answers were Sorted based on User's Feedback



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

Answer / sandeep

Absolutely no .
Because the question asks that whether we can define a main inside other main,they did't ask about we can call main by its self or not.
#include<stdio.h>
void main()
{
void main()
{
printf("main");//un ambigious
}

}

Is This Answer Correct ?    0 Yes 0 No

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

Answer / arun

we can main() inside main() it will work as like as
recursive funtion and it would like a infinate loop

Is This Answer Correct ?    2 Yes 4 No

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

Answer / qq

int main()
{ /*main();*/
printf("Thant's it");
}

Is This Answer Correct ?    3 Yes 6 No

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

Answer / jagadish

main()
{
clrscr();
printf("");
getch();
}

Is This Answer Correct ?    5 Yes 31 No

Post New Answer

More C Interview Questions

If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

0 Answers  


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

0 Answers   Aspire, Infogain,


What is the 'named constructor idiom'?

0 Answers  


What is main return c?

0 Answers  


the maximum value that an integer constant can have is a) -32767 b) 32767 c) 1.701e+38 d) -1.7014e+38

1 Answers  






What are different types of pointers?

0 Answers  


Can i use “int” data type to store the value 32768? Why?

0 Answers  


Explain c preprocessor?

0 Answers  


what is difference between #include<stdio.h> and #include"stdio.h"

4 Answers  


Can you define which header file to include at compile time?

0 Answers   Aspire, Infogain,


Do you know the use of 'auto' keyword?

0 Answers  


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

0 Answers  


Categories