+ 2
int n=printf("0"); printf("%d",n);
What will be the output
6 Respostas
+ 9
printf function returns the number of characters it prints on the console.
int n = printf("0");
First 0 will be printed, then it will return the number of characters it printed which in this case 1.
So n is equal to 1.
On next line, printf("%d", n) ;
well print 1 which is the value of n.
So 01 is the output.
+ 4
01
Btw, you can run this and check by yourself.
And please specify the relevant tags.
+ 4
Khushi Puri, nAutAxH AhmAd means, why you gave Java tag as you asked a C language question
+ 3
Please explain
+ 3
Thanks
+ 3
Farhan Sorry for the mistake