C++ Interview Questions
Questions Answers Views Company eMail

How to reduce a final size of executable?

3 14080

Give 2 examples of a code optimization?

4 13385

if 4-5 year old brother is standing on d roof with me and watching d moon, suddenly moon coverd by cloud then how will i explain d hiding of moon to my brother.

MBT,

8 9999

write a piece of c++ code which allocate memory to the 50 object of type CObj

2 6103

what is object slicing?

L&T, Wipro,

9 47276

tell me about yourself ?i want answer for frehers with various exasmples?

HCL,

2 6186

who is the founder of c++?

Hexaware, ONGC,

15 34202

//what is wrong with the programme?? #include template class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<g; g.set(); g.print(); }

1 3753

what is pulse code modulation?

Wipro,

2 9488

what is an instance of a class

5 7091

wrong statement about c++ a)code removably b)encapsulation of data and code c)program easy maintenance d)program runs faster

11 20488

const char * char * const What is the differnce between the above two?

TCS,

11 17640

What is a class?

Infosys, TCS, Thylak,

32 24084

What is an object?

HCL,

14 13713

What is the difference between an object and a class?

3 5959


Un-Answered Questions { C++ }

What does it mean to declare a member variable as static?

604


Explain the difference between realloc() and free() in c++?

527


What is the operator in c++?

614


Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---

1641


Define the process of error-handling in case of constructor failure?

557






If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B – D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2. please answer my question ....

1769


What is the two main roles of operating system?

508


What are classes oop?

592


What is a dll entry point?

555


What is the precedence when there is a global variable and a local variable in the program with the same name?

629


What is stl in c++ with example?

629


Which ide is best for c++?

536


Difference between Call by pointer and by reference.

539


Explain encapsulation in C++.

551


What is searching? Explain linear and binary search.

575