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 / meruva

%d means it prints only given value,
and %*d means it prints garbage value.
for eg: //it prints i value is=10
int i=10;
printf("i value is=%d",i);

//it prints garbage value
int i=10;
printf("i value is=%*d",i);

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by gets in c?

1165


Write a program to check armstrong number in c?

1119


What is a loop?

1013


What are reserved words?

1093


What is calloc()?

1064


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1987


What are the benefits of c language?

1158


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2562


What is a void * in c?

1061


What is const volatile variable in c?

1022


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1152


In a switch statement, explain what will happen if a break statement is omitted?

1046


What are the differences between Structures and Arrays?

1188


What are the different types of pointers used in c language?

1032


Is it valid to address one element beyond the end of an array?

1157