Sunday, February 5, 2012

Tricky c questions and answers














Tricky c
programs question for interview and answers with explanation. These questions
are for experienced persons.





C advanced interview questions and
answers



(1) What will be output if you will compile and execute the following c code?




struct marks{

int p:3;

int c:3;

int m:2;

};

void main(){

struct marks s={2,-6,5};

printf("%d %d %d",s.p,s.c,s.m);

No comments:

Post a Comment