We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The %n specifier does not print anything and the corresponding argument must be a pointer to signed integer where the number of characters written so far is stored.
int count;
printf("Jashin is a good coder %n,but not Best. ",&count);
/*
now compiler with count the number of character before %n and
will assign to count variable.*/
printf("%d",count); 23
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
The %n specifier does not print anything and the corresponding argument must be a pointer to signed integer where the number of characters written so far is stored.
int count;
printf("Jashin is a good coder %n,but not Best. ",&count);
/* now compiler with count the number of character before %n and will assign to count variable.*/
printf("%d",count); 23