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 |
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR
Explain the difference between malloc() and calloc() in c?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
write a function that accepts an array A with n elements and array B with n-1 elements. Find the missing one in array B,with an optimized manner?
f=(x>y)?x:y a) f points to max of x and y b) f points to min of x and y c)error
What are local variables c?
What is the benefit of using const for declaring constants?
What is a Deque?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
write a program to arrange the contents of a 1D array in ascending order
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }