Determine Output:#define clrscr() 100void main(){ clrscr(); printf("%d", clrscr());} 1 Error 100 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int c[] = {2.8,3.4,4,6.7,5}; int j, *p=c, *q=c; for(j=0;j<5;j++){ printf(" %d ", *c); ++q; } for(j=0;j<5;j++){ printf(" %d ", *p); ++p; }} 2 2 2 2 2 2 3 4 6 5 2.8 3.4 4 6.7 5 2.8 3.4 4 6.7 2 3 4 6 5 2 3 4 6 5 2.8 2.8 2.8 2.8 2.8 2.8 3.4 4 TRUE ANSWER : ? YOUR ANSWER : ?
What will be printed when this program is executed?int f(int x){ if(x <= 4) return x; return f(--x);}void main(){ printf("%d ", f(7)); } Syntax error Runtime error 1 2 3 4 4 5 6 7 4 TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of the following statements?for(i=10; i++; i<15) printf("%d ", i); 9 10 11 12 13 None of these Infinite loop 10 11 12 13 14 15 10 11 12 13 14 TRUE ANSWER : ? YOUR ANSWER : ?
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 );} 9 1 0.25 0.5 2 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output given program?#include<stdio.h>void main(){int i = -10;for(;i;printf("%d ", i++));} -10 to infinite Complier error -10 to 0 -10 to -1 TRUE ANSWER : ? YOUR ANSWER : ?
void main(){ int a=10, b; b = a++ + ++a; printf("%d %d %d %d", b, a++, a, ++a);}what will be the output when following code is executed? 22 11 11 11 12 10 11 13 22 13 14 14 22 14 12 13 22 12 12 13 TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=i++, j=j++, k=k++; printf("%d %d %d", i, j, k);} 1 1 1 0 0 0 garbage values Error TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of this program on an implementation where int occupies 2 bytes?#include <stdio.h>void main(){ int i = 3; int j; j = sizeof(++i + ++i); printf("i=%d j=%d", i, j);} the behavior is undefined i=5 j=2 i=4 j=2 i=3 j=2 TRUE ANSWER : ? YOUR ANSWER : ?
Pick the correct statements.I. The body of a function should have only one return statement.II. The body of a function may have many return statements.III. A function can return only one value to the calling environment.IV. If return statement is omitted, then the function does its job but returns no value to the calling environment. I and II I and III II and III III and IV II and IV TRUE ANSWER : ? YOUR ANSWER : ?