C++ Interview Questions
Questions Answers Views Company eMail

Which data structure gives efficient search? A. B-tree B. binary tree C. array D. linked list

ABC, Sun Microsystems,

21 24893

Give the output of the following program main() {char *p='a'; int *i=100/*p; } what will be the value of *i= 1

Sun Microsystems,

6 9951

Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");

Sun Microsystems,

8 12958

c# support late binding or early binding.

6 15292

When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory??

HCL, Honeywell,

13 18034

how to create thread in java?

IBM, Infosys, Wipro,

17 18872

Difference between over loading and over ridding?

CTS, Patni, Softvision Solution,

12 24228

what is virtual function?

Aspire, HP, Infosys, RoboSoft, TCS,

26 56010

what is an array

17 14246

pointers are support in C#? if yes then how to use it?

Softvision Solution,

8 10438

how to overload << and >> operator in c++

Wipro,

3 8661

What is command routing in MFC

GE,

1 7225

what is new modifier in C#

HCL,

8 11565

Write a function which takes a character array as input and reverses it in place.

Lehman Brothers, Vision Infotech,

2 7965

Write a String class which has: 1) default constructor 2) copy constructor 3) destructor 4) equality operator similar to strcmp 5) constructor which takes a character array parameter 6) stream << operator

HCL, Lehman Brothers, Zoomerang,

2 8184


Un-Answered Questions { C++ }

find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2001


Explain the concept of dynamic allocation of memory?

619


What is lvalue?

701


Describe the different styles of function prototypes in C++.

539


What is a constructor in c++ with example?

582






Can a constructor return a value?

575


What is class definition in c++ ?

630


What is the best ide for c++?

576


write a program to convert a decimal number in to its equivalent binary number?

2084


What is the rule of three?

576


What do you mean by function overriding & function overloading in c++?

604


Write a program to show polymorphism in C++?

634


Explain the use of vtable.

620


What is the best c++ compiler for windows 10?

582


What is a binary file? List the merits and demerits of the binary file usagein C++.

730