C++ Technical Interview Questions and Answers - 1
Question: 1
Explain virtual class and friend class?
Virtual Base Class:
It is used in context of multiple inheritance in C++.
If you want to derive two classes from a class, and further derive one class from the two classes in the second level, you need to declare the uppermost base class as “virtual” in the inherited classes. These prevent multiple copies of the uppermost base class data members when an object of the class at the third level of hierarchy is created.
Friend Class: When a class declares another class as its friend, it is giving complete access to all its data and methods including private and protected data and methods to the friend class member methods.
Question: 2
How many fundamental data types are there?
Integral,
Float and
Void are the three fundamental data types.
Question: 3
What are the rules to be followed while writing variable name?
A variable must begin with an alphabet or underscore followed by alphabets or numbers.
Question: 4
How many words are there for data types and what are they?
There are nine words for data types such as
char,
int,
double,
float,
void,
short,
signed,
long and
unsigned
Question: 5
When is the variable called as garbage?
When the variables get undefined values known as garbage.
- C++ Interview Questions and Answers for Experienced
- Top 200+ C++ Interview Questions and Answers
- C++ Interview Questions and Answers for Freshers
- Advanced C++ Programming Interview Questions and Answers
- C++ Language Interview Questions for Experienced Pdf
- C++ Programs Asked in Interview for Freshers
- C++ Interview Questions and Answers Pdf
- C++ Language Interview Questions and Answers for Freshers Pdf
- C++ Questions and Answers
- Top 250+ C++ Constructor and Destructor Programming Interview Questions
- C++ basic interview questions and answers pdf
- C++ Programming Interview Questions and Answers
- C++ Technical Interview Questions and Answers
- Top 200+ Advanced C++ Interview Questions 2020-2021
- C++ Lab Viva-Practical Exams Questions and Answers
- C++ Coding Interview Questions and Answers
Power Semiconductor Device and Integrated Circuits Questions More
Strength of Materials Questions and Answers Pdf More
Steam and Power Generation Quiz Questions & Answers Pdf More
Dc generator questions and answers pdf More
DC Generator Questions and Answers Pdf More
1000+ Ethiopian Bank Aptitude Test Questions and Answers Pdf More
Top 150+ C Language Online Test More
Computer Abbreviations and their Meanings Pdf More
1000+ Mechanical Operations Interview Questions and Answers More
Top 151+ Sports General Knowledge Questions and Answers More