Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Where define directive used?

1034


What is local and global variable in c?

1131


What is wrong with this initialization?

957


Explain setjmp()?

1011


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

1133


What is calloc in c?

1081


Why c is a procedural language?

1012


write a program to generate address labels using structures?

4524


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1073


difference between Low, Middle, High Level languages in c ?

2028


How do we open a binary file in Read/Write mode in C?

1181


What is hashing in c language?

1191


What is a node in c?

921


What does sizeof function do?

1128


Why use int main instead of void main?

1073