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

How can you pass an array to a function by value?

0 Answers  


int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?

4 Answers   TCS,


Function to find the given number is a power of 2 or not?

20 Answers   Motorola, nvidia,


Find the highest of three numbers and print them using ascending orders?

1 Answers  


how do you execute a c program in unix.

0 Answers  


difference between loading and linking

1 Answers  


what about "char *(*(*a[])())();"

3 Answers   Oracle,


who is the father of c

4 Answers   Infosys,


What are the benefits of c language?

0 Answers  


How do you list files in a directory?

0 Answers  


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

0 Answers   Subex,


Categories