Sunday 11 January 2009

Printf function questions and answer with solution


Printf objective types interview questions and answers  

(1)

#include

#include

void main()

{

int a=5,b=6,c=11;

clrscr();

printf("%d %d %d");

getch();

}



What will output when you compile and run the above code?



(a)Garbage value garbage value garbage value

(b)5 6 11

(c)11 6 5

(d)Compiler error



Answer: (c)

(2)



#include



void main()

{

char *

No comments:

Post a Comment