C++ Interview Questions
Questions Answers Views Company eMail

What is Copy Constructor?

ABC, Siemens,

5 11425

What is an abstract class?

Siemens,

3 5581

What is the difference between creating an object, using 'new' and using 'malloc'?

Siemens, HFG,

2 6981




What is a virtual base class?

Siemens,

6 16463

What is OOPS and How it is different from Procedural Programming ?

Infosys, HP, Thyrocare,

23 51290

Difference between Top down and bottom up approaches for a given project ?

Siemens, Infosys, HCL, CSC, HP, IIT, BSNL,

14 92639

What and all can a compiler provides by default?

Accenture, HP,

3 9377

What are the different operators in C++?

HP,

3 10375

What is the difference between method and message?

HP,

4 35118

What is difference between initialization and assignment?

Infosys, HCL, HP,

12 42950

when can we use copy constructor?

HP,

6 11707

Describe functional overloading?

HP,

6 7202

Difference between Overloading and Overriding?

IBM, NIIT, GameLoft, HP, Appnetix Techno, Rohde and Schwarz,

35 174869

Difference between Operator overloading and Functional overloading?

HP,

10 42400

What is virtual constructor paradigm?

HCL, HP,

5 8893







Un-Answered Questions { C++ }

String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

971


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1140


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

871


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?

627


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

1129


What is interface? When and where is it used?

775


can we make game by using c

1833


what type of questions

862


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1111


explain sub-type and sub class? atleast u have differ it into 4 points?

998


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

810


I want to write a C++ language program that: 1. 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. The program should work for squares of all side sizes between 1 and 20.

1179


Write a c++ program to display pass and fail for three student using static member function

1668


what type of question are asked in thoughtworks pair programming round ?

375


Objective The objective of this problem is to test the understanding of Object-Oriented Programming (OOP) concepts, in particular, on encapsulation. Problem Description Create a program for managing customer’s bank accounts. A bank customer can do the following operations: 1. Create a new bank account with an initial balance. 2. Deposit money into his/her account. 3. Withdraw money from his/her account. For this operation, you need to output “Transaction successful” if the intended amount of money can be withdrawn, otherwise output “Transaction unsuccessful” and no money will be withdrawn from his/her account. Input The input contains several operations and is terminated by “0”. The operations will be “Create name amount”, “Deposit name amount”, or “Withdraw name amount”, where name is the customer’s name and amount is an integer indicating the amount of money. There will be at most 100 bank accounts and they are all created on the first month when the bank is opening. You may assume that all account holders have unique names and the names consist of only a single word. Output The output contains the transaction result of withdrawal operations and the final balance of all customers after some withdrawal and deposit operations (same order as the input). Sample Input Create Billy 2500 Create Charlie 1000 Create John 100 Withdraw Charlie 500 Deposit John 899 Withdraw Charlie 1000 0

846