C++ Interview Questions
Questions Answers Views Company eMail

What do you mean by abstraction in C++?

1 847

What do you mean by call by value and call by reference?

4 1285

What are the static members and static member functions?

1 968

What is the difference between shallow copy and deep copy?

1 833

How do you allocate and deallocate memory in C++?

1 1066

Which operator can not be overloaded in C++?

1 839

Q1 On the screen how do you write the following words? she sells seashells by the seashore (a) all in one line (b) in three lines Q2 Write a program that asks interactively the user’s name and age and responds with Hello name, next year you will be next_age. where next_age is age + 1 Q3 For the different values of n, what is the output? printf(“%x %c %o %d”,n,n,n,n); (a) n = 67 (b) n = 20 (c) n = 128 (d) n = 255 (e) n = 100 Q4 What will be the output of the following program? int main() { char a,b,c; scanf(“%c %c %c”,&a,&b,&c); printf(“a=%c b=%c c=%c”,a,b,c); return 0; } [Note: The user input is:ABC DEF GHI]

1 1634

Write a C++ Program to Display Number (Entered by the User).

1 517

Identify the error in the following program. #include void main() { int i = 0; i = i + 1; cout « i « " "; /*comment *//i = i + 1; cout << i; }

1 535

Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69

2 1641

Write a C++ Program to find Square Root of a number using sqrt() function.

1 716

Write a C++ Program to Find Sum and Average of three numbers.

1 513

Write a program to read two numbers from the keyboard and display the larger value on the screen

1 712

Write a C++ Program to Find whether given Number is Odd or Even.

1 667

Write a C++ Program to Reverse a Number using while loop.

1 664


Un-Answered Questions { C++ }

What is the difference between a type-specific template friend class and a general template friend class?

756


Differentiate between late binding and early binding. What are the advantages of early binding?

791


How do you differentiate between overloading the prefix and postfix increments?

803


Explain linear search.

826


What is a linked list in c++?

772


Explain abstraction.

825


What is polymorphism explain?

954


Which is the best c++ compiler for beginners?

782


Explain deep copy?

794


What is stl containers in c++?

773


What do you mean by translation unit?

813


What is a constructor initializer list?

822


What is the real life example of polymorphism?

841


what is scupper?

2079


What is a stack? How it can be implemented?

898