What will be the output of the following program code?main(){ static int var = 5; printf("%d ", var--); if(var) main();} Infinite Loop 5 5 5 5 5 Compilation Error None of these 5 4 3 2 1 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ static int i=5; if(--i){ main(); printf("%d ", i); }} None of These 0 0 0 0 5 4 3 2 1 Infinite Loop 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? It will not compile because not enough initializers are given 12 7 6 24 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));} 5 5 5 2 5 5 2 4 5 2 4 4 TRUE ANSWER : ? YOUR ANSWER : ?
The output of the following program is:#define f(g,g2) g##g2void main(){ int var12=100; printf("%d", f(var,12));} g##g2 Runtime error Syntax error 100 10012 TRUE ANSWER : ? YOUR ANSWER : ?
What is right way to Initialize array? int n{} = { 2, 4, 12, 5, 45, 5 }; int num[6] = { 2, 4, 12, 5, 45, 5 }; int n(6) = { 2, 4, 12, 5, 45, 5 }; int n{6} = { 2, 4, 12 }; TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char far *farther, *farthest; printf("%d..%d", sizeof(farther), sizeof(farthest));} 2..4 4..2 4..4 2..2 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i = abc(10); printf("%d", --i);}int abc(int i){ return(i++);} None of These 10 9 11 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following program code?#include<stdio.h>void main(){ int i = 10; void *p = &i; printf("%f", *(float *)p);} None of these. Error 10 0.000000 TRUE ANSWER : ? YOUR ANSWER : ?
Choose the correct statement.I. The scope of a macro definition need not be the entire program.II. The scope of a macro definition extends from the point of definition to the end of the file.III. New line is a macro definition delimiter.IV. A macro definition may go beyond a line. I, II, III and IV I, II and III II and III I and II II, III and IV TRUE ANSWER : ? YOUR ANSWER : ?