0
I want to know....why do we use '%d' in C language?
4 Antworten
+ 16
● it is format specifier for int data type
● %d is used to format the output in C lanaguage
//taking user input as integer
int x;
scanf("%d",&x);
//printing integer type x
printf("%d",x);
● have a look at this Lesson for more information about other format specifiers also :
https://www.sololearn.com/learn/C/2912/
+ 9
Its format specifier for int in c
Example
int f=23;
printf("%d is int",f);
Output:
23 is int
+ 5
To show the data which is present in variable
+ 2
Thank you a lot friends......