1. Given the following statement enum day = { jan = 1 ,feb=4, april, may} What is the value of may?

(a) 4

(b) 5

(c) 6

(d) 11

(e) None of the above

2. Find the output for the following C program

main()

{int x,j,k;

j=k=6;x=2;

x=j*k;

printf("%d", x);

3. Find the output for the following C program

fn f(x)

{ if(x<=0)

return;

else f(x-1)+x;

}

4. Find the output for the following C program

i=20,k=0;

for(j=1;j<i;j=1+4*(i/j))

{k+=j<10?4:3;

}

printf("%d", k);

Ans. k=4

5. Find the output for the following C program

int i =10

main()

{int i =20,n;

for(n=0;n<=i;)

{int i=10;

i++;

}

printf("%d", i);

Ans. i=20

6. Find the output for the following C program

int x=5;

y= x&y

7.Find the output for the following C program

Y=10;

if( Y++>9 && Y++!=10 && Y++>10)

{printf("%d", Y);

else

printf("%d", Y);

}

Ans. 13

8. Find the output for the following C program

f=(x>y)?x:y

a) f points to max of x and y

b) f points to min of x and y

c)error

Ans. (a)

9. What is the sizeof(long int)

(a) 4 bytes

(b) 2 bytes

(c) compiler dependent

(d) 8 bytes

10. Which of the function operator cannot be over loaded

(a) <=

(b) ?:

(c) =

(d) *

11. Find the output for the following C program

main()

{intx=2,y=6,z=6;

x=y==z;

printf(%d",x)

}

Disclaimer: These are questions/Answers posted by various candidates over years, TutionCentral(TC) does not assume any legal liability or responsibility for the accuracy, completeness or usefulness of the information. Information provided in the site is solely intended for general guidance purpose and assumes the reader of the page full responsibility of use.