Whether there can be main inside another main?If so how does
it work?
Answers were Sorted based on User's Feedback
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 |
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 |
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Explain the concept and use of type void.
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
how to connect oracle in C/C++.
What is difference between union and structure in c?
What is the scope of static variables in c language?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; }
How to write the code of the program to swap two numbers with in one statement?
how to write a data 10 in address location 0x2000
What is the difference between i++ and i+1 ?(in terms of memory)
what would be the output of the follwing struct st { char name[20]; int i; float f; }; main() { struct st emp = {"forum"}; printf("%d %f",emp.i,emp.f); }