What is the difference between %d and %*d in C
Answers were Sorted based on User's Feedback
Answer / meruva
%d means it prints only given value,
and %*d means it prints garbage value.
for eg: //it prints i value is=10
int i=10;
printf("i value is=%d",i);
//it prints garbage value
int i=10;
printf("i value is=%*d",i);
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / nithya
%d print the value for example
int x=2;
printf("x=%d",x);
output:
x=2
%*d print the value for example
int x=2;
printf("x=%*d",x);
output:
x= 2
the output two space(x=2) next the value will be display
(x=6) the output 6 space next the value will be display
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ram
%d prints the given value,
%*d... used to print the mentioned length of given value
| Is This Answer Correct ? | 0 Yes | 5 No |
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
How are portions of a program disabled in demo versions?
Why c language?
What is the code in while loop that returns the output of given code?
how can you print&scan anything using just one character? :) HINT: printf,scanf similer
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
Explain built-in function?
Suggesting that there can be 62 seconds in a minute?
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
Explain void pointer?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
What was noalias and what ever happened to it?