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 I ensure that integer arithmetic doesnt overflow?

0 Answers  


Compare and contrast compilers from interpreters.

0 Answers  


How can a number be converted to a string?

1 Answers  


How can you tell whether two strings are the same?

0 Answers  


program to find the magic square

1 Answers   Infosys,






WHAT IS FLOAT?

3 Answers  


How can I sort a linked list?

0 Answers  


main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); }

4 Answers   CitiGroup,


how to find greatet of 10 numbers without using array?

4 Answers  


write a progam to compare the string using switch case?

1 Answers  


what is difference b/w extern & volatile variable??

6 Answers   Teleca,


I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?

3 Answers  


Categories