what is the difference between %d and %*d in c languaga?
Answer Posted / sivakumar
anand and manini your expectations are wrong. because %d
give the original value of the variable and %*d give the
address of the variable.
eg:-
int a=10,b=20;
printf("%d%d",a,b);
printf("%*d%*d",a,b);
result is 10 20 1775 1775
here 1775 is the starting address of the memory allocation
for the integer.a and b having same address because of
contagious memory allocation.
| Is This Answer Correct ? | 35 Yes | 19 No |
Post New Answer View All Answers
What is derived datatype in c?
What is the difference between struct and typedef struct in c?
code for find determinent of amatrix
can we change the default calling convention in c if yes than how.........?
Is boolean a datatype in c?
Explain what is the purpose of "extern" keyword in a function declaration?
What is a built-in function in C?
how many errors in c explain deply
What are the valid places to have keyword “break”?
What is 2c dna?
What is data type long in c?
What is "Hungarian Notation"?
What are the uses of null pointers?
What is malloc calloc and realloc in c?
what do you mean by enumeration constant?