o/p of: c = printf("%d%d", a, b);

int main()
int a,b,c;
c=printf("%d%d",a,b); //line 5
return 0

what will be the output of this C program..Please explain how line 5 works.


  • o/p=554
    /*line 5-prototype and definition of printf()is defined in stdio.f file
    on execution it will first print 55.on executing second printf(),since the return type of printf() is the number of characters(along with format specifier) it has printed and since here 4 values has been printed so 4 will be assigned to c and hence printed out*/
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion