main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above
Answers were Sorted based on User's Feedback
Answer / sushil
it will give a run time error since , return cannot be used
as it is used in ternary operator.
| Is This Answer Correct ? | 1 Yes | 3 No |
Write a program that reads a dynamic array of 40 integers and displays only even integers
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list)
3 Answers Disney, Google, ZS Associates,
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
Write a program to model an exploding firecracker in the xy plane using a particle system
why is printf("%d %d %d",i++,--i,i--);
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
Implement a t9 mobile dictionary. (Give code with explanation )
1 Answers Amazon, Peak6, Yahoo,
main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }