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
Is array a primitive data type in c?
Can include files be nested? How many levels deep can include files be nested?
What is #ifdef ? What is its application?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me
What is the general form of a C program?
Does c have circular shift operators?
Why is sprintf unsafe?
What are the advantages of c preprocessor?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
How do you determine the length of a string value that was stored in a variable?
Why c is a mother language?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Why is main function so important?
Explain the ternary tree?