What is the use of fflush(stdin) in c++?
Answers were Sorted based on User's Feedback
Answer / saravanan
fflush will used to write file immediately instead of
storing in the memory.
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / paul
For input streams, fflush() discards any buffered data that has been fetched from the underlying file, but has not been by the application.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / 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 |
Answer / madhava
enter a result at the input given data to particular location
| Is This Answer Correct ? | 0 Yes | 3 No |
Petrol pump mgt. system: To design a program that display an interface for the sale of the Petrol and then make the entries at the backend in the database.
what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me
What is the difference between class and structure?
Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort
What is cohesion in oop?
in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
When you define a integer it gets stored in which data structure?(Stack or a heap)
Write a program in c++ to read two floating point numbers and find their sum and average.
I am DeePu sotware engineer working with EMC corporation ,recently I had attended mcafee interview . Their questions were at heights of stupidity , I don't know what they want , I am a developer with 4 year experienced .I am listing the questions asked 1:What is the flag in g++ to avoid structure padding 2:In wht order parameters are passed to stack 3:How you will edit code segment of an exe
write a C++ program for booking using constructor and destructor.