What is the meaning of percent s in C programming?

1 answer

Answer

1249062

2026-07-31 06:20

+ Follow

%d is used as a format mask to represent an integer.

Any of the "formatted" io functions can use this: printf, fprintf, scanf, etc.

Example:
int i = 0;
printf("%d", i); // prints the value of i
This is a format specifier which is used to identify that the given input is an integer or not
In C: c%d means the remainder dividing c with d

in printf/scanf format string: %d means an integer data
For extracting or inserting data which is signed integer in decimal format

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.