C Programming Consider the following code:void main(){ int a[5] = {6,8,3,9,0}, i=0; if(i != 0) { break; printf("%d", a[i]); } else printf("%d", a[i++]);}What is the output of the above program? Runtime error Syntax error 6 No output 8 Runtime error Syntax error 6 No output 8 ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the final value of the digit?void main(){ int digit = 0; for( ; digit <= 9; ) digit++; digit *= 2; --digit;} 16 -1 17 19 20 16 -1 17 19 20 ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine output:#include void main(){ char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq");} Depends on the compiler p q nullp nullq x nullq where x can be p or nullp depending on the value of NULL Depends on the compiler p q nullp nullq x nullq where x can be p or nullp depending on the value of NULL ANSWER DOWNLOAD EXAMIANS APP
C Programming 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 );} 1 9 2 0.5 0.25 1 9 2 0.5 0.25 ANSWER DOWNLOAD EXAMIANS APP
C Programming Consider the following program fragment:for(c=1, sum=0; c <= 10; c++){ scanf("%d", &x); if( x < 0 ) continue; sum += x;}What would be the value of sum for the input 1, -1, 2, -2, 3, -3, 4, -4, 5, -5 30 1 15 10 -5 30 1 15 10 -5 ANSWER DOWNLOAD EXAMIANS APP
C Programming If integer needs two bytes of storage, then maximum value of an unsigned integer is 215 – 1 216 – 1 None of these 216 215 215 – 1 216 – 1 None of these 216 215 ANSWER DOWNLOAD EXAMIANS APP