0
What is %*c in scanf("%d%*c",t);? #include <stdio.h> int main(void) { int t; scanf("%d%*c", &t); printf("%d",t);
What does %*c mean?
2 odpowiedzi
+ 4
"%*c" stands for assignment-suppressing character: If this option is present, the scanf does not assign the result of the conversion to any receiving argument. the character will be read but not assigned to any variable.
for example for the input "45r" it will assign 45 to "t", but "r" will be ignored.
+ 2
Thanks for your help.