C
Programming and Technical
Programming
Arrays
printf("%d",printf("%d",printf("%d",1234)));
Read Solution (Total 8)
-
- 123441 is the correct answer (verified).
printf returns no. of printable characters. here the middle printf prints 4 as the right most printf prints 1234 i.e. 4 characters . similarly the outer most printf prints 1 as the middle printf prints only 1 character i.e. 4 only. Hence output is 1234--4--1 - 7 years agoHelpfull: Yes(11) No(0)
- 1234 1234 1234
- 8 years agoHelpfull: Yes(4) No(10)
- 123441
the execution is from right to left.
first the number 1234 is printed as it is and second %d(from left to right) prints the no.of digits of 1234 so o/p is 12344.
1st %d(from left to right) prints the no.of digits that there in only 2nd %d - 8 years agoHelpfull: Yes(3) No(0)
- 123441 is the right answer
- 7 years agoHelpfull: Yes(1) No(0)
- I think there is a problem in this website . That is few characters like less than () are not displaying in the solution window. Admin do something. Thanks
- 7 years agoHelpfull: Yes(0) No(1)
- 123441 is the output
- 7 years agoHelpfull: Yes(0) No(0)
- first printf from right prints all the values that is 1234 and middle printf print 4 the total number of input innermost printf gives and the leftmost printf print 1 the middle printf gives 1 output
- 6 years agoHelpfull: Yes(0) No(0)
- answer is 1 as inner loop is first executed as 1234 then in the second step only consider number of digits it is carrying i.e)4 adn third follows second step as it gives 1 as output
- 6 years agoHelpfull: Yes(0) No(0)
C Other Question