What is the use of fflush(stdin) in c++?

Answer Posted / poonam

Is it used for any memory management or buffer management?
I thought over it and the answer i got was that it is used
for buffer memory management...Is it correct?

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1781


What is debug class?what is trace class? What differences are between them? With examples.

1612


What is difference between polymorphism and inheritance?

619


What is the important feature of inheritance?

637


What is meant by oops concept?

615






Why is polymorphism used?

588


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

633


What is abstraction and encapsulation?

576


Can static class have constructor?

587


What are benefits of oop?

639


What is interface in oop?

664


What is the difference between abstraction and polymorphism?

619


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1702


What is multilevel inheritance in oop?

557


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3848