Problem with character

Asked

Viewed 19 times

-1

My teacher introduced me to a method of debugging scanf with characters , but did not give me the explanation of this;

What is the meaning of this "%*c"?

1 answer

0

The expression "%*cmeans: Read and ignore a character.

Example:

char s[20];

int d;

scanf(“%19[^:-]%*c%d”, s, &d);

It reads up to 19 characters in’s' and only for when it comes to two points.

Take a look at this post: What does %*c Mean in C/C++ Programming?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.