what will be the output of "printf("%d%d",scanf("%d%
d",&a,&b))".provide an explation regarding the question

Answer Posted / amegha

scanf() returs the number of vlaues read successfully. so
heree the pritf() prints the value that is returned by the
scanf(), ie 2.(a,b). so the output will be 2 and some
garbage value.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 types of organizational structures?

625


What does c mean before a date?

592


What does %d do in c?

547


What is difference between scanf and gets?

614


Are pointers integers in c?

611






Explain output of printf("Hello World"-'A'+'B'); ?

977


What is a char in c?

556


What is a string?

666


Why we use break in c?

552


What are the difference between a free-standing and a hosted environment?

745


What are the functions to open and close file in c language?

729


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

611


How can I do peek and poke in c?

621


Is calloc better than malloc?

578


Is stack a keyword in c?

637