Determine Output:void main(){ char *p; printf("%d %d", sizeof(*p), sizeof(p));} 2 2 1 2 2 1 1 1 TRUE ANSWER : ? YOUR ANSWER : ?
Find the output of the following program.void main(){ printf("%d, %d", sizeof(int *), sizeof(int **));} 4, 4 0, 2 2, 0 2, 2 2, 4 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i = abc(10); printf("%d", --i);}int abc(int i){ return(i++);} 11 10 9 None of These TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=3; switch(i) { default: printf("zero"); case 1: printf("one"); break; case 2: printf("two"); break; case 3: printf("three"); break; }} None of These zero Error three 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 );} The loop will run infinitely many times. The program will not enter into the loop. Prints the value of 0 one time only. A run time error will be generated. There will be a compilation error reported. TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of the following program?#include<stdio.h>int c[10] = {1,2,3,4,5,6,7,8,9,10}; main(){ int a, b=0; for(a=0;a<10;++a) if(c[a]%2 == 1) b+=c[a]; printf("%d", b);} None of these 25 24 30 20 TRUE ANSWER : ? YOUR ANSWER : ?
The statement int **a; is legal but meaningless None of these. is syntactically and semantically correct is illegal TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int a[] = {10,20,30,40,50}, j, *p; for(j=0; j<5; j++){ printf("%d" ,*a); a++; } p = a; for(j=0; j<5; j++){ printf("%d" ,*p); p++; }} 10 20 30 40 50 Garbage Value 10 20 30 40 50 10 20 30 40 50 None of These Error TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#include<stdio.h>void main(){ int i=10; printf("i=%d", i); { int i=20; printf("i=%d", i); i++; printf("i=%d", i); } printf("i=%d", i);} 10 10 11 11 10 20 21 10 10 20 21 20 10 20 21 21 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following program?#include<stdio.h>void main(){ int i = 10; void *p = &i; printf("%d\n", (int)*p);} 10 Compiler time error Undefined behavior Segmentation fault/runtime crash TRUE ANSWER : ? YOUR ANSWER : ?