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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are header files in c?

1080


Where in memory are my variables stored?

1186


What is the difference between union and anonymous union?

1307


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1102


Why structure is used in c?

1191


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1145


Why does everyone say not to use scanf? What should I use instead?

1422


What functions are used for dynamic memory allocation in c language?

1153


Difference between constant pointer and pointer to a constant.

1147


Which header file is essential for using strcmp function?

1483


Explain the difference between #include "..." And #include <...> In c?

1029


What is strcpy() function?

1161


What is the importance of c in your views?

1175


Explain how can I convert a number to a string?

1152


Without Computer networks, Computers will be half the use. Comment.

2300