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 make program without <> in libray.
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
explain how do you use macro?
write a program to print the one dimensional array.
What are the advantage of c language?
What is meaning of "Void main" in C Language.
24 Answers Ford, GU, HCL, IBIBS, JUW, TCS,
How to print "I Love My India" without using semi colon?
YBJBU6
Can stdout be forced to print somewhere other than the screen?
write a c programs to do multiplication of two numbers with out using arithmatic operator ??????????
what do you mean by inline function in C?
int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d", i);