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

What are structure types in C?

1083


What is the use of pointers in C?

1058


Explain how do you declare an array that will hold more than 64kb of data?

1438


What is the description for syntax errors?

1140


Describe the steps to insert data into a singly linked list.

1053


What is a node in c?

967


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2053


Describe dynamic data structure in c programming language?

1075


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1116


What is the difference between functions getch() and getche()?

1086


Does c have enums?

1081


Is anything faster than c?

995


What is a pointer variable in c language?

1083


Write a program to reverse a given number in c?

1016


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

2061