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 is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....
write a program without using main function?
What is the purpose of sprintf?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
what is c++ programming?
a=0; b=(a=0)?2:3; a) What will be the value of b? why b) If in 1st stmt a=0 is replaced by -1, b=? c) If in second stmt a=0 is replaced by -1, b=?
Write a routine that prints out a 2-D array in spiral order!
What is derived datatype in c?
Do you know null pointer?
What are the advantages of Macro over function?
What is the difference between array and structure in c?
How to print %d in output