Determine Output:void main(){ static int var = 5; printf("%d ", var--); if(var) main();} 5 4 3 2 1 None of These Infinite Loop 5 5 5 5 5 TRUE ANSWER : ? YOUR ANSWER : ?
short testarray[4][3] = { {1}, {2,3}, {4,5,6}};printf("%d", sizeof(testarray));Assuming a short is two bytes long, what will be printed by the above code? 12 7 6 24 It will not compile because not enough initializers are given TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=1, j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; }} None of These GOOD BAD GOOD Compiler Error TRUE ANSWER : ? YOUR ANSWER : ?
The operator > and < are meaningful when used with pointers, if None of these. The pointers point to structure of similar data type. The pointers point to elements of the same array. The pointers point to data of similar type. TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int c = - -2; printf("c=%d", c);} 1 -2 Error 2 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following statements are true after execution of the program.void main(){ int a[10], i, *p; a[0] = 1; a[1] = 2; p = a; (*p)++;} a[1] = 2 a[0] = 2 a[0] = 3 Compilation error a[1] = 3 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the value of sum after the following program is executed?void main(){ int sum=1, index = 9; do{ index = index – 1; sum *= 2; }while( index > 9 );} 0.5 0.25 1 2 9 TRUE ANSWER : ? YOUR ANSWER : ?
What is the right choice, if the following loop is implemented?void main(){ int num = 0; do{ --num; printf("%d", num); }while( ++num >= 0 );} There will be a compilation error reported. The program will not enter into the loop. Prints the value of 0 one time only. The loop will run infinitely many times. A run time error will be generated. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#includevoid main(){float num=5.6;switch(num){case 5:printf("5");case 6:printf("6");default : printf("0");break;}printf("%d", num);} 5 5.600000 0 5.600000 6 5.600000 Complier error TRUE ANSWER : ? YOUR ANSWER : ?