C++
C++ is known as one of the difficult programming language to learn, it has complex syntax and multi paradigm nature and that's why it's hard to understand!
C++ is also known for game programming, Browser developing, operating system and Software Engineering as well Applications.
This Interview is for Educational purpose, it will be quite helpful if you can get through with it. Because most of are commonly asked questions in this technical round.
1. What is C++?
C++ is an object-oriented programming language, which is created by Bjarne Stroustrup. It was released in 1985.
2. What is Object Oriented Programming (OOP)?
OOP is methodology, which provide many concepts.
Encapsulation :- It is a technique of wrapping the data members and their functions in one unit. It binds data within a class, no outside method can access the data.
Abstraction :- It is used to hide the internal implementations and some mandatory details. Data abstraction is implemented using interfaces and classes in C++.
Classes and Object :- It is mainly used for specify the data. They define the type of data, even create any number of object from a class. Main thing is that Objects are the instances of classes.
Inheritance :- It is used to inherit the property of one class into another class. It become helpful to define and distinguish one class in term of another class.
3. What is a Class?
It is a user-define data type, which is connected wit the keyword class. The class contain the data members, functions, which is defined by three modifiers are private and protected. We can create N number of objects from a class.
4. How delete[] is different from delete?
Delete is used to release a unit of memory, while delete[] is used to release an array.
5. What is an Object?
The class provide a blueprint for objects. That's why you can create an object from a class. Whenever we declare variable of basic types is as same as class are declared with that type of sort of declaration.
6. What is the difference between an array and a list?
▪︎ Array memory allocation is static and continuous while list memory allocation is dynamic and random.
▪︎ In array, it is not necessary to be in track of next memory allocation while in the list, users need to be in track of next allocation.
▪︎ An array, is collection of homogeneous elements while list is a collection of heterogeneous elements.
7. What is a destructor?
A destructor is used to delete any extra resources allocated by the object. Destructor have the same name as class name and it is preceded by tilde. It does not contain any other arguments and no return type.
8. What is a class template?
It is used to create a family of classes and functions. For instance, we can create a template of an array class which will enable us to create an array of various type of float, char etc. That's how we can create a template for a function.
9. What is function overriding?
If you inheritance a class into a derived class and provide a definition for one of the best class's function again inside the derived class, then this function is called overridden function.
10. Full form of STL in C++.
STL = Standard Template Library, which is namespace in C++.
11. Which programming language's unsatisfactory performance led to the discovery of C++?
C++ was discovered to cope with the disadvantage of C.
12. Which operations are permitted on pointers?
There are some operations which can be performed by pointer,
• Incrementing and Decrementing a pointer
There are two kind of increment pointer:-
1. Pre-increment pointer
2. Post-increment pointer
• Subtracting a pointer from another pointer
13. What are the C++ access specifiers?
There are 3 types of access specifiers :-
1. Private
2. Public
3. Protected
14. Define token in C++.
It can be a keyword, identifiers, literal, symbol and constant.
15. What are the different types of polymorphism in C++?
Polymorphism means multiple forms. It means having more than one function with the same function name.
There's two types of polymorphism:-
• Runtime polymorphism
• Compile time polymorphism
➽ This is model questions and answers, but this is also important question will be asked in any companies. So, be prepared for other complex questions.
1 Comments
Thanks for this Interview glimpse! I want this for long time!
ReplyDelete