what is purpose of fflush(stdin) function


Answers were Sorted based on User's Feedback



what is purpose of fflush(stdin) function ..

Answer / rajnish

to clear input buffer

Is This Answer Correct ?    70 Yes 10 No

what is purpose of fflush(stdin) function ..

Answer / ashutosh

the use of fflush(stdin) is to clear the input buffer bcoz when ever we take an input the space is allocated to it but after its scope gets over, the input is removed but the space allocated is as it is. it can be used only by using headerfile
#include<stdio.h>

Is This Answer Correct ?    60 Yes 10 No

what is purpose of fflush(stdin) function ..

Answer / addu

fflush is used to clear all non printable characters which are existed through standard input i.e.,stdin

Is This Answer Correct ?    14 Yes 3 No

what is purpose of fflush(stdin) function ..

Answer / revathi pawar

to clear the thngs which r stored in memory..
the disadv s that we cant c the clearance of data

Is This Answer Correct ?    8 Yes 12 No

Post New Answer

More C Interview Questions

What are Macros? What are its advantages and disadvantages?

0 Answers   TCS,


why do we use pointer instead directly acessing the data?

2 Answers  


what is the defrenece between structure and union

5 Answers   Aloha Technology,


What are global variables and explain how do you declare them?

0 Answers  


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,






What does sizeof int return?

0 Answers  


a simple program in c language

5 Answers   IBM,


what is computer engg

1 Answers  


Explain what is a stream?

0 Answers  


int x=5; printf("%d%d%d",x,x<<2,x>>2);

2 Answers   TANCET,


write a c program to remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC

2 Answers   HCL,


in malloc and calloc which one is fast and why?

1 Answers  


Categories