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 |
What are the rules for the identifier?
What is C language ?
is it possible to create your own header files?
#define min((a),(b)) ((a)<(b))?(a):(b) main() { int i=0,a[20],*ptr; ptr=a; while(min(ptr++,&a[9])<&a[8]) i=i+1; printf("i=%d\n",i);}
What is #include in c?
do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's?
What is the difference between void main and main in c?
Explain setjmp()?
How to convert decimal to binary in C using recursion??
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
0 Answers College School Exams Tests,
what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,z; z=x-- -y; printf("\n%d %d %d",x,y,z); }
Explain about the functions strcat() and strcmp()?