

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Use of fflush(stdin) in C
The function fflush(stdin) is used to flush the output buffer of the stream. It returns zero, if successful otherwise, returns EOF and feof error indicator is set.
Here is the syntax of fflush(stdin) in C language,
int fflush(FILE *stream);
Here is an example of fflush(stdin) in C language,
Example
#include #include int main() { char s[20] = "Helloworld"; printf("The string : %s", s); fflush(stdin); return 0; }
Output
The string : Helloworld
- Related Questions & Answers
- fflush() function in PHP
- Understanding stdin, stderr and stdout in Linux
- Use of realloc() in C
- Use of bool in C
- Use of explicit keyword in C++
- How to use use an array of pointers (Jagged) in C/C++?
- What is use of fluent Validation in C# and how to use in C#?
- What is the use of cin.ignore() in C++?
- What is the use of sizeof Operator in C#?
- What is the use of yield return in C#?
- What is the use of static constructors in C#?
- What is the use of `%p` in printf in C?
- Use ReaderWriter Lock in C#
- How to use enums in C/C++?
- When to use extern in C/C++
Advertisements