MCQOPTIONS
Saved Bookmarks
This section includes 75 Mcqs, each offering curated multiple-choice questions to sharpen your C Program knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
_Determine Output:void main(){ static int i=i++, j=j++, k=k++; printf("%d %d %d", i, j, k);}$? |
| A. | 1 1 1 |
| B. | 0 0 0 |
| C. | garbage values |
| D. | Error |
| Answer» B. 0 0 0 | |
| 52. |
_Determine Output:void main(){ int i=0; for(;i++;printf("%d", i)); printf("%d", i);}$? |
| A. | 1 |
| B. | 11 |
| C. | 12 |
| D. | Error |
| Answer» B. 11 | |
| 53. |
_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);}$? |
| A. | 0 0 1 2 0 |
| B. | 0 0 1 3 0 |
| C. | 0 0 1 3 1 |
| D. | 0 0 0 2 1 |
| Answer» D. 0 0 0 2 1 | |
| 54. |
_Determine Output:#define square(x) x*xvoid main(){ int i; i = 64/square(4); printf("%d", i);}$? |
| A. | 4 |
| B. | 64 |
| C. | 16 |
| D. | None of These |
| Answer» C. 16 | |
| 55. |
_Determine Output:void main(){ char far *farther, *farthest; printf("%d..%d", sizeof(farther), sizeof(farthest));}$? |
| A. | 4..2 |
| B. | 2..2 |
| C. | 4..4 |
| D. | 2..4 |
| Answer» B. 2..2 | |
| 56. |
_Determine Output:void main(){ int c = - -2; printf("c=%d", c);}$? |
| A. | 1 |
| B. | -2 |
| C. | 2 |
| D. | Error |
| Answer» D. Error | |
| 57. |
Determine Output:void main(){ float me = 1.1; double you = 1.1; if(me==you) printf("I hate Examveda"); else printf("I love Examveda");}$? |
| A. | I hate Examveda |
| B. | I love Examveda |
| C. | Error |
| D. | None of These |
| Answer» C. Error | |
| 58. |
Determine Output:void main(){ int c[] = {2.8,3.4,4,6.7,5}; int j, *p=c, *q=c; for(j=0;j |
| A. | 2 3 4 6 5 2 3 4 6 5 |
| B. | 2.8 3.4 4 6.7 5 2.8 3.4 4 6.7 |
| C. | 2.8 2.8 2.8 2.8 2.8 2.8 3.4 4 |
| D. | 2 2 2 2 2 2 3 4 6 5 |
| Answer» E. | |
| 59. |
Determine Output:#includevoid main(){ register i=5; char j[]= "hello"; printf("%s %d", j, i);} |
| A. | hello 5 |
| B. | hello garbage value |
| C. | Error |
| D. | None of These |
| Answer» B. hello garbage value | |
| 60. |
Determine Output:void main(){ int i=i++, j=j++, k=k++; printf("%d %d %d", i, j, k);} |
| A. | 1 1 1 |
| B. | 0 0 0 |
| C. | garbage values |
| D. | Error |
| Answer» D. Error | |
| 61. |
Determine Output:void main(){ int i; printf("%d", scanf("%d", &i)); // value 10 is given as input here} |
| A. | 10 |
| B. | 1 |
| C. | Garbage Value |
| D. | None of These |
| Answer» C. Garbage Value | |
| 62. |
Determine Output:void main(){ static int i=5; if(--i){ main(); printf("%d ", i); }} |
| A. | 5 4 3 2 1 |
| B. | 0 0 0 0 |
| C. | Infinite Loop |
| D. | None of These |
| Answer» C. Infinite Loop | |
| 63. |
Determine Output:void main(){ int i=5; printf("%d%d%d%d%d", i++, i--, ++i, --i, i);} |
| A. | 45545 |
| B. | 54544 |
| C. | 55445 |
| D. | 54554 |
| Answer» B. 54544 | |
| 64. |
Determine Output:void main(){ printf("%p", main);} |
| A. | Error |
| B. | make an infinite loop |
| C. | Some address will be printed |
| D. | None of These |
| Answer» D. None of These | |
| 65. |
Determine Output:void main(){ int i=10; i=!i>14; printf("i=%d", i);} |
| A. | 10 |
| B. | 14 |
| C. | 0 |
| D. | 1 |
| Answer» D. 1 | |
| 66. |
Determine Output:void main(){ char s[]="man"; int i; for(i=0; s[i]; i++) printf("%c%c%c%c ", s[i], *(s+i), *(i+s), i[s]);} |
| A. | mmm nnn aaa |
| B. | mmmm nnnn aaaa |
| C. | Compiler Error |
| D. | None of These |
| Answer» E. | |
| 67. |
Determine Output:void main(){ char *p; p="%dn"; p++; p++; printf(p-2, 300);} |
| A. | %d\n |
| B. | 300 |
| C. | Error |
| D. | None of These |
| Answer» C. Error | |
| 68. |
Determine Output:void main(){ char not; not = !2; printf("%d", not);} |
| A. | 2 |
| B. | Garbage Value |
| C. | 0 |
| D. | None of These |
| Answer» D. None of These | |
| 69. |
Determine Output:void main(){ int i; char a[]="ÔøΩ"; if(printf("%sn", a)) printf("Ok here n"); else printf("Forget itn");}# |
| A. | Ok here |
| B. | Forget it |
| C. | Error |
| D. | None of These |
| Answer» B. Forget it | |
| 70. |
Determine Output:void main(){ int i=1, j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; }} |
| A. | GOOD BAD |
| B. | GOOD |
| C. | Compiler Error |
| D. | None of These |
| Answer» D. None of These | |
| 71. |
Determine Output:void main(){ int i=0, j=0; if(i && j++) printf("%d..%d", i++, j); printf("%d..%d", i, j);} |
| A. | 0..1 |
| B. | 1..0 |
| C. | 0..0 |
| D. | 1..1 |
| Answer» D. 1..1 | |
| 72. |
Determine Output:void main(){ char string[]="Hello World"; display(string);}void display(char *string){ printf("%s", string);} |
| A. | will print Hello World |
| B. | Compiler Error |
| C. | Can't Say |
| D. | None of These |
| Answer» C. Can't Say | |
| 73. |
Determine Output:#define clrscr() 100void main(){ clrscr(); printf("%d", clrscr());} |
| A. | 0 |
| B. | 1 |
| C. | 100 |
| D. | Error |
| Answer» D. Error | |
| 74. |
Determine the Final Output:void main(){ printf("\nab"); printf("\bsi"); printf("\rha");} |
| A. | absiha |
| B. | asiha |
| C. | haasi |
| D. | hai |
| Answer» E. | |
| 75. |
Determine output:void main(){ int const *p=5; printf("%d", ++(*p));} |
| A. | 6 |
| B. | 5 |
| C. | Garbage Value |
| D. | Compiler Error |
| Answer» E. | |