C++ Interview Questions
Questions Answers Views Company eMail

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

Infosys,

1828

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.

2276

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

What is DeadlyDiamondDeathProblem ?

1 3163

Which is the best institute in hyderabad for C/C++ and it also has fast track course structure.

Wipro,

13 29414

Write a program to multiply 3x3 matrics

1 3321

Write a program to accept a number and to print numbers in pyramid format? for eg:for a no. 5 1 212 32123 4321234 543212345

7 24498

Write a C++ program that asks the user to choose a number between 1 and 1000. Then, your program should be able to guess the number by asking the user no more than 10 yes/no questions. Use a while loop in your program

1 6278

1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.

Tech Mahindra,

1 3695

1.what are two type of classe members called? 2.what is data hiding and data encapsulation? 3.how do you make a class member visible aouside its class? 4.what is the default visibility of a class data member? 5.what are the advantages of oop over the structured programing?

6 9720

write a program which best describes polymorphism in real world?

CTS, Infosys, NexGen,

2 8283

Write a program to read the data and evaluate the results of the election. Print all output to the screen. Your output should specify: The total number of votes, the number of valid votes and the number of spoilt votes. The winner(s) of the election. Hint: An appropriate search should be used to determine the winner(s). The votes obtained by each candidate sorted in terms of the number of votes obtained. Hint: An appropriate sort should be used to sort the candidate(s). The Source code should be saved as VotingSystem. Project Input: Candidates’ Names and Numbers 2501 Victor Taylor 2502 Denise Duncan 2503 Kamal Ramdhan 2504 Michael Ali 2505 Anisa Sawh 2506 Carol Khan 2507 Gary Owen Votes 3 1 2 5 4 3 5 3 5 3 2 8 1 6 7 7 3 5 6 9 3 4 7 1 2 4 5 5 1 4 0 Project Output: Invalid vote: 8 Invalid vote: 9 Number of voters: 30 Number of valid votes: 28 Number of spoilt votes: 2 The winner(s): 2503 Kamal Ramdhan 2505 Anisa Sawh Candidate Score 2503 Kamal Ramdhan 6 2505 Anisa Sawh 6 2501 Victor Taylor 4 2504 Michael Ali 4 2502 Denise Duncan 3 2507 Gary Owen 3 2506 Carol Khan 2

2642

How do you print for example the integers 3,2,1,5,4 in a binary tree within the console in format where it looks like an actual binary tree?

1666

what Is DCS ? what i will get benefit when i did?

1827

program explaining feautures of c++

Satyam,

1912


Un-Answered Questions { C++ }

what is C++ exceptional handling?

620


How to declaring variables in c++?

649


What is a .lib file in c++?

558


What is the two main roles of operating system?

508


Define anonymous class.

619






What is the difference between the compiler and the preprocessor?

609


Is std :: string immutable?

557


What is anonymous object in c++?

626


In C++ what is a vtable and how does it work?

600


What are multiple inheritances (virtual inheritance)?

576


What is the basic of c++?

592


Can you name some types of inheritance?

633


It is possible to build a C++ compiler on top of a C compiler. How would you do this?

537


What is the main purpose of overloading operators?

584


What are the advantages of polymorphism?

567