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 |
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
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is the 'named constructor idiom'?
What is main return c?
the maximum value that an integer constant can have is a) -32767 b) 32767 c) 1.701e+38 d) -1.7014e+38
What are different types of pointers?
Can i use “int” data type to store the value 32768? Why?
Explain c preprocessor?
what is difference between #include<stdio.h> and #include"stdio.h"
Can you define which header file to include at compile time?
Do you know the use of 'auto' keyword?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above