C++ Interview Questions
Questions Answers Views Company eMail

What do you mean by abstraction in C++?

1 523

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

1 497

What are the static members and static member functions?

1 617

What is the difference between shallow copy and deep copy?

1 508

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

1 741

Which operator can not be overloaded in C++?

1 522

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 1234

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

1 264

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 250

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

2 671

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

1 433

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

1 272

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

1 334

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

1 395

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

1 382


Un-Answered Questions { C++ }

What is the difference between the functions memmove() and memcpy()?

619


What is a class and object?

587


Why do we need c++?

589


What is a loop? What are different types of loops in c++?

585


How would you find out if a linked-list is a cycle or not?

538






write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2490


What is long in c++?

726


Why do we need constructors in c++?

603


What does and I oop and sksksk mean?

642


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

579


Is it possible to provide special behavior for one instance of a template but not for other instances?

626


Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

1574


Is string part of stl?

668


What is multilevel inheritance?

713


What are vectors used for in c++?

613