Top "Scanf" questions

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

Scanf unsigned char in hex

I am trying to change data in array, this is part of my code: u_char paket[100]; //here i put …

c hex scanf unsigned-char
problems with scanf("%d\n",&i)

For this code: int i; scanf("%d\n",&i); I am not able to stop my program until I …

c++ c format scanf formatted-input
Fgets skipping inputs

I've tried looking around and I can't seem to find where the error lies. I know it must have something …

c scanf fgets
C - equivalent of .NET Console.ReadLine

I need to accomplish the same behavior as .NET Console.ReadLine function provides. The program execution should continue when the …

c console scanf enter
Is there any function to get an unlimited input string from standard input

The condition is: I want to input a line from standard input, and I don't know the size of it, …

c input char scanf gets
Safer but easy-to-use and flexible C++ alternative to sscanf()

When I need to scan in values from a bunch of strings, I often find myself falling back to C's …

c++ string parsing scanf
scanf Cppcheck warning

Cppcheck shows the following warning for scanf: Message: scanf without field width limits can crash with huge input data. To …

c scanf cppcheck
scanf %u negative number?

I have tried scanf("%u",&number) and I have entered negative number the problem is when I printf("%d",…

c printf scanf unsigned format-specifiers
sscanf & newlines

I need to parse a response from a server like this: risposta: 200\n Len 1040\n Expire 30\n \n 1111111111111111111111111\n 1111111111111111111111111\n 1111111111111111111111111\…

c newline eof scanf
Escaping square bracket ] in sscanf

I want to scan lines like "[25, 28] => 34" I wrote a small program to test it out: #include <cstdlib> #…

c parsing escaping scanf format-specifiers