C++ Interview Questions
Questions Answers Views Company eMail

Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.

1 791

Write a C++ Program to Find Sum and Average of n numbers using for loop.

1 413

Write a program to read the values a, b and c and display x, where x=a/b–c. Test the program for the following values: (a) a = 250, b = 85, c = 25 (b) a = 300, b = 70, c = 70

1 555

Identify the error in the following program. include using namespace std; void main() { int num[]={1,2,3,4,5,6}; num[1]==[1]num ? cout<<"Success" : cout<<"Error"; }

1 403

Identify the errors in the following program. #include using namespace std; void main() { int i=5; while(i) { switch(i) { default: case 4: case 5: break; case 1: continue; case 2: case 3: break; } i-; } }

1 573

Write a C++ Program to Check Whether a character is Vowel or Consonant.

2 340

Write a C++ Program to find Addition of Two Numbers.

1 283

Write a C++ Program to Multiply two Numbers

1 477

Write a C++ Program to Generate Random Numbers between 0 and 100

1 686

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

824


Un-Answered Questions { C++ }

Define Virtual function in C++.

616


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

575


total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

2075


Explain the operation of overloading of an assignment operator.

685


Give an example of run-time polymorphism/virtual functions.

550






Explain the isa and hasa class relationships. How would you implement each?

601


Which is not a valid keyword a) public b) protected c) guarded

731


What does enum stand for?

605


What are the four main data types?

574


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

664


Define anonymous class.

617


Do you know about multiple inheritance?

634


What's the order in which the objects in an array are destructed?

841


Write a program to concatenate two strings.

577


What is token c++?

568