Top "Scanf" questions

Questions related to the scanf() family of functions in the C runtime library, which read and convert formatted data.

Using scanf for reading an unsigned char

I'm trying to use this code to read values between 0 to 255 (unsigned char). #include<stdio.h> int main(…

c scanf
how use EOF stdin in C

I need to input coordinates into an array until EOF is encountered, but something is wrong in my code. I …

c stdin scanf feof
Format specifier in scanf for bool datatype in C

I am using bool datatype in C std99 whose definitions are defined in <stdbool.h>. Now I want …

c scanf format-specifiers
Using scanf with NSStrings

I want the user to input a string and then assign the input to an NSString. Right now my code …

objective-c string scanf
Is there any difference in using %f, %e, %g, %E or %G with scanf?

In C, is there any difference in the format specifiers %f, %e, %g, %E and %G when used to read …

c floating-point scanf
scanf() skip variable

In C, using scanf() with the parameters, scanf("%d %*d", &a, &b) acts differently. It enters value for …

c scanf
getc Vs getchar Vs Scanf for reading a character from stdin

Of the below three functions: getc getchar & scanf which is the best one for reading a character from stdin …

c character scanf getchar getc
What should I use instead of sscanf?

I have a problem that sscanf solves (extracting things from a string). I don't like sscanf though since it's not …

c++ scanf c++-standard-library
When should I use ampersand with scanf()

What are the rules for using ampersand in c while using scanf()? struct Student { char name[20]; int id; }; int main(…

c string scanf
C getchar vs scanf

I am confused by a piece of code found in a function I am studying: char GetCommand( void ) { char command; …

c scanf getchar