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

7/14/2019 6:11:13 PM

S.S.A.V Panchajanya

1 Answer

New Answer


The optional * will skip the input field. so only var a and b will get value