What will be the output of the following program code?main(){ static int var = 5; printf("%d ", var--); if(var) main();} 5 4 3 2 1 None of these 5 5 5 5 5 Compilation Error Infinite Loop TRUE ANSWER : ? YOUR ANSWER : ?
What does the following declaration mean?int (*ptr)[10]; ptr is a pointer to an array of 10 integers ptr is an array of 10 integers ptr is an pointer to array ptr is array of pointers to 10 integers TRUE ANSWER : ? YOUR ANSWER : ?
What will be printed if the following code is executed?void main(){ int x=0; for( ; ; ) { if( x++ == 4 ) break; continue; } printf("x=%d", x);} x=0 Error x=1 x=4 x=5 TRUE ANSWER : ? YOUR ANSWER : ?
Which command is used to skip the rest of a loop and carry on from the top of the loop again? skip continue None of these break resume TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=-1, j=-1, k=0, l=2, m; m = i++ && j++ && k++ || l++; printf("%d %d %d %d %d", i, j, k, l, m);} 0 0 1 2 0 0 0 0 2 1 0 0 1 3 1 0 0 1 3 0 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following code?#includevoid main(){ int s=0; while(s++<10) { if(s<4 && s<9) continue; printf("%dt", s); }} None of these 1 2 3 10 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 4 5 6 7 8 9 10 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int c = - -2; printf("c=%d", c);} -2 1 2 Error TRUE ANSWER : ? YOUR ANSWER : ?
What is right way to Initialize array? int num[6] = { 2, 4, 12, 5, 45, 5 }; int n{} = { 2, 4, 12, 5, 45, 5 }; int n{6} = { 2, 4, 12 }; int n(6) = { 2, 4, 12, 5, 45, 5 }; TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program. void main() { int i=01289; printf("%d", i); } Syntax error 1289 0713 713 0289 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:#include<stdio.h>void main(){ register i=5; char j[]= "hello"; printf("%s %d", j, i);} Error None of These hello garbage value hello 5 TRUE ANSWER : ? YOUR ANSWER : ?