Quantcast
Channel: C
Viewing all articles
Browse latest Browse all 46

Solution to Problem When using scanf() before fgets() or gets() in C

$
0
0
There are a certain functions in C, which if used in a particular combination may cause problems. These problems are due to the conflicting behaviors of the functions. In this article, we will understand the problem caused by using one such combination of functions scanf() and fgets()/gets().

But before that, lets first understand what does these two functions do?

Understanding scanf()



scanf() function reads input from the standard input stream stdin.

Lets...

Solution to Problem When using scanf() before fgets() or gets() in C

Viewing all articles
Browse latest Browse all 46

Trending Articles