what is the difference between %d and %*d in c languaga?
Answer Posted / azad sable,chiplun.
In first case i.e. '%d' the '%' indicates that the
conversion specification follows. And 'd' known as data
type charactor indicates that the no. to be read is in
intiger mode.
* is an input field which specifie field width.
example
scanf("%d%*d%d",&a,&b);
will assign the data 123 456 789 as follows.123 to a 456
skipp because of * 789 to b.
Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
Are the outer parentheses in return statements really optional?
Can we add pointers together?
Write the Program to reverse a string using pointers.
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Explain what are the __date__ and __time__ preprocessor commands?
What is malloc() function?
What is hashing in c?
How can I find the modification date and time of a file?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
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"
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
Why functions are used in c?
Explain what is the benefit of using enum to declare a constant?
What is hash table in c?
What is the right way to use errno?