2 votes 2 votes Please explain the output. #include<stdio.h> int main() { int c; printf("geeks for %ngeeks ", &c); printf("%d", c); getchar(); return 0; } Programming in C non-gate + – Shubham Kumar Gupta asked Sep 20, 2017 Shubham Kumar Gupta 395 views answer comment Share Follow See 1 comment See all 1 1 comment reply A_i_$_h commented Sep 20, 2017 reply Follow Share the answer is geeks for geeks 10 no matter whatever value we assign to variable c tooo i think it printing ASCII value of %n ,....but still not clearly understood the execution 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Output would be "geeks for" followed by some garbage value...%n in printf statement specifies print all the charcters before the occurence of %n sandeepjkh answered Sep 20, 2017 sandeepjkh comment Share Follow See all 0 reply Please log in or register to add a comment.