C++ Interview Questions
Questions Answers Views Company eMail

What do you mean by abstraction in C++?

1 534

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

1 515

What are the static members and static member functions?

1 634

What is the difference between shallow copy and deep copy?

1 517

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

1 758

Which operator can not be overloaded in C++?

1 537

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 1246

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

1 273

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 257

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

2 719

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

1 442

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

1 281

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

1 343

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

1 405

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

1 390


Un-Answered Questions { C++ }

What is the difference between Stack and Queue in C++?

542


Is it possible to write a c++ template to check for a function's existence?

574


When would you choose to return an error code rather than throw an exception?

535


What are the benefits of pointers?

592


Write a C++ program to print strings in reverse order.

514






Define stl.

773


What are exceptions c++?

591


How should a contructor handle a failure?

684


What are keywords in c++?

598


What is flag in computer?

601


What is the full name of logo?

582


How can you link a c program with a c function?

563


Do you know about Agilent PRECOMPILERS. ?

597


What are arrays c++?

604


How a new operator differs from the operator new?

620