0 votes 0 votes What is the use of %n being used in printf statement saipriyab asked Sep 21, 2017 saipriyab 358 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply saxena0612 commented Sep 21, 2017 reply Follow Share %n is quite special access specifier which in turn assign the no of characters printed on console to the value that has been passed as argument . For example : printf("%nGATE ",&d).will result d=4. After printing gate. 0 votes 0 votes A_i_$_h commented Sep 21, 2017 reply Follow Share #include<stdio.h> int main() { int c; printf("geeks for %ngeeks ", &c); printf("%d", c); getchar(); return 0; } What will this print? 0 votes 0 votes saxena0612 commented Sep 21, 2017 reply Follow Share first printf : geeks for geeks second : 13 Overrall : geeks for geeks13? 0 votes 0 votes A_i_$_h commented Sep 21, 2017 reply Follow Share No , it prints geeks for geeks 10 0 votes 0 votes Please log in or register to add a comment.