C++ General Interview Questions
Questions Answers Views Company eMail

Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

608

Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

999

What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

598

Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

608

What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

582

What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number

774

Which of the following is evaluated first: a) && b) || c) !

1799

What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

578

Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

601

Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

628

Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

614

What operator is used to access a struct through a pointer a) >> b) -> c) *

588

True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

1853

What character terminates all character array strings a) b) . c) END

668

If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

831


Post New C++ General Questions

Un-Answered Questions { C++ General }

Tell me can a pure virtual function have an implementation?

550


What is c++ 11 and c++ 14?

578


Explain the purpose of the keyword volatile.

627


Show the declaration for a pointer to function returning long and taking an integer parameter.

571


Is there structure in c++?

585






Define 'std'.

601


What is guard code in c++?

633


Can static member variables be private?

622


Is swift faster than go?

609


int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}

828


What's the best free c++ profiler for windows?

617


A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.

3402


Differences between private, protected and public and give examples.

575


How do you invoke a base member function from a derived class in which you have not overridden that function?

580


What is command line arguments in C++? What are its uses? Where we have to use this?

572