What is*f inthe following program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is*f inthe following program

Can you explain what is the use of%*f in the following int a,b; char c[10]; scanf("%2d %d %*f %5s",&a,&b,&c); printf("\n %d%d%s",a,b,c); i removed %*f in scanf and gave input 12 231456 tri it is showing 12 231 456 can you explain why

14th Jul 2019, 6:11 PM
S.S.A.V Panchajanya
1 Answer
+ 2
The optional * will skip the input field. so only var a and b will get value
14th Jul 2019, 6:15 PM
Subrat Kumar Das
Subrat Kumar Das - avatar