Learn C++ From Interview Questions

3.4

Updated on

Course overview

Provider
Udemy
Course type
Paid course
Level
All Levels
Duration
8 hours
Lessons
121 lessons
Certificate
Available on completion
Course author
Satish Venkatesh
  • The Audience will be well versed with the understanding of C++ Programming Concepts and Terminologies

Description

C++

Welcome to the Course " Learn C++ From Interview Questions "

This course is from a software engineer who has managed to crack interviews in around 16 software companies.

Sometimes, life gives us no time to prepare, There are emergency times where in we have to buck up our guts and start  bringing the situations under our control rather then being in the control of the situation.  At the end of the day, All leave this earth empty handed. But given a situation, we should live up or fight up in such a way that the whole action sequence should make us proud and be giving us goosebumps when we think about it right after 10 years.

We observe in quite a lot of interviews that most of us find it quite confusing (at the moment) to answer basic questions like the format of the a.out file, not having a clear understanding of the distinction between protected and private data members of the class, finding it difficult to create static libraries and dynamic libraries, not knowing that is there is really a difference between static and dynamic libraries, confusion in the usage of different combinations of dynamic memory allocation and free calls like new, delete, malloc and free , unknown about the difference between up casting and object slicing, thinking that the concepts of function templates and template functions are similar. 

The basic problem is here even though most of us are good at concepts, We get confused while answering when we come across a tricky question. As we all know, these tricky questions are simpler ones which are twisted and turned while asking them in the interviews. This is just to confuse the candidate in order to check whether the candidate really has a strong hold on the concepts.

Here in this course, We have tried an approach where in we are trying to make our audience understand the concepts of c++ through tricky interview questions.

This course is designed for almost 7.5 hours and a preview of 30 mins. Please go through the c++ questions dealt and the preview of the course. If you are interested, Kindly enroll in the course. 

Kindly adjust the talking speed in accordance to your convenience (Please set the course narration speed to 1.24x on your conveniencce.). The concepts are presented in Neutral English.  

As per Udemy Policy, you can always refund if you want to withdraw from the course at any point of time.

The Questions handled in the course is as follows:

Where are the function declarations found
Where are the function definitions found
After compilation, are the function definitions found in a.out file
In static library, are the library files part of the executable file (a.out)
In dynamic library, are the library files part of the executable file (a.out)
What is the full form of a.out
What is the format of a.out file
Is reference a constant pointer
What happens when a reference variable is re-assigned a value from another variable 
What happens when a reference variable is used with & and is re-assigned a value from another variable
What is the difference between a reference and constant pointer
What is the advantage of a reference over a pointer
How does a reference to a reference work
In the given program, convert all the const pointer statements to references
Explain the below statements:
    int *const p;
    const int *p;
    const int * const p;
    int const *p;
What is the difference between the operators (&) and (&*) when used in the context of pointers
In C++, is it mandatory to name a structure or a union
Is the life time of a locally declared reference limited to the function in which it is declared
Declare the following:
    an array of 5 integers
    an array of 5 pointers
    a pointer to an array of 5 integers
    a reference to an array of 5 integers
Is it possible to create an array of references
Can we have multiple definitions of a function in a single module
What is the difference between declaration and definition of a variable
Define a structure which contains a member function to add 2 of it’s data members and print the result
Does a pointer to a variable act like a constant reference OR Does a reference to a variable act like constant pointer
A reference can point to different variables but a variable can’t be tied to multiple references
Does scope resolution operator help us in retrieving only the value of global variables whose identifier names are similar to the local variable names
What is the difference between the below two statements:
   a constant reference 
   reference is a constant pointer
Can we call a pointer ( which points to a read only string ) as a constant pointer
Do we get a lvalue error in an assignment statement where a function call is placed on the left hand side of the assignment operator
Are there only 2 ways to pass variables to a function ?
Does passing arguments by reference really advantageous
Is static variable intermodular or intramodular
Are Inline functions similar to macro definitions
Function overloading is asking the same function to perform different tasks in different contexts of the program
Name mangling is the concept where a name management database is used to maintain different global variables across different modules
Can we overload the function to accept an char value and an char reference
Suppose I have a structure having data members. I create 2 structure objects. Can I add 2 structure objects which automatically will take care of adding the data members of the 2 objects of the structure
Can we increment the data member of the structure through the structure object using the ++ operator
Operator overloading is programming the operator to perform a different function
In function overloading, Is name mangling concept applied on both function definitions and declarations 
Is name mangling concept taken care for all the functions irrespective of whether the function is overloaded or not
Function overloading is differentiating the function( with same names) based on their return type
Can A function be overloaded only once
We will get a compilation error, if we overload --operator to perform incrementation
Macros perform typechecking of the arguments passed to macro functions
What is a class and a object
Is it true that A constructor is not a mandatory function in a class
Is it true that A destructor function is automatically called when the object of the class is constructed
Is it true that when Malloc allocates memory dynamically when creating an object of the class, it also calls the constructor
Is it true that when New allocates memory dynamically when creating an object of the class, it doesn’t call the constructor
Is it true that when Delete operator calls the destructor function of the class when the object is being destroyed
Is it true that when Free function can be used to free the memory which is dynamically allocated by using the new operator
Is it true that when Delete operator can be used to free the memory which is dynamically allocated by using the new operator
Can A public data member of the class can be accessed from anywhere with in the class or from outside the class
Can A private data member of the class can be accessed by the class object from outside the class
Can A member function of the class can be made private
Can A public member function of a particular class can be called by the object of the class from outside the class
Can A private member function cannot be called directly by the object of the class from outside the class
Can I alter the private data member of the class from outside the class
Is it true that A static member function can be accessed only by the class name from outside the class
Can a static member function change the data member value belonging to a particular object
Can a constructor of a object initialize the static data member of the class
Can a normal member function change modify the static data member of the class
What is the difference between a static member function accessing the static data member and a normal member function accessing the static data member
Can we modify a publicly declared static data member from outside the class
Can one class contain an another class in it
Create an array of 3 objects and initialize them
Is it logical to initialize the data members in the class when the class is created
Can we initialize the public const data member of the class from outside the class
Can one class have an other class’s object declared in it’s private section
Can we create an object of an anonymous/nameless class 
Does an overloaded assignment operator get’s called by default when one object is assigned to the other object
Does an overloaded ‘+’ operator get’s called by default when one object is added with another object
Can we assign an integer value to an object 
Explain the concept of this pointer
Is it true that the member functions can only access the data members related to class
Can we create a static object
Can we have a const member function
Is there any difference between assignment operators and copy constructors 
Which function get’s called when an object is passed to a function or returned from a function by value
Is it true that If a derived class is privately derived from a base class then the protected and public data members of the base class will become private for the desired class
Is it true that If a derived class is protectedly derived from a base class, then protected and public data members of the base class will become protected for the derived class
Is it true that If a derived class inherits privately all public members of the base class, the public member of the base class will become private for the derived class 
Continued from the above statement, can we make some of the members of the base class to be accessible from outside the derived class
Is the size of the base class is equal to the sum of the sizes of the data members of the base class and the derived classes 
Is it true that multiple inheritance is similar to multilevel inheritance
Can we derive a child class from a base class even before the base class is defined
A derived class is derived publicly from the base class. The derived class has got a member function which overrides the member function 
defined in the base class . Is it true that the member function of the base class will be called by an object of the derived class
Is it true that the base class can access the public members of the derived class
Is it true that When a class is publicly derived from a base class, then the private members of the base class is not accessible from outside the derived class, but the public and protected members are accessible from outside and inside the member functions of the derived class
Is it true that When a class is privately derived from a base class, the protected and public members of the base class will become private for the derived class 
Is it true that When a class is protectedly derived from a base class, then the protected and public members of the base class become protected members of the derived class 
Is it true that The object of the derived class can access the private and protected members of the base class from outside the derived class
Is it true that a virtual function without the expression = 0 added to the declaration can’t be overridden
Is it true that An abstract class is something where in the derived class can’t override the member functions of the base class
Is it true that we can’t have a pointer to an abstract class
Is it true that The normal functions are resolved at run time
Is it true that the virtual table contain the address of virtual functions
Is it true that The address of the derived class object can’t be stored in a base class pointer. This leads to a compilation error
Is it true that Virtual functions don’t support polymorphism
Can a derived class pointer can call the virtual function defined in the base class 
Is it true that The virtual function table is shared across different objects of the class
Is it true that The this pointer contains the address of the object where as the object contains vptr which in turn holds the address of the virtual table
Can we have a pure virtual constructor and destructor functions
Is it true that An abstract base class is something which doesn’t contain a pure virtual function
Is it true that An abstract class doesn’t need a constructor
Is it true that The ‘has a’ is a concept where in when a class is derived from another class, it is said to a type of it’s base class 
Is it true that The ‘kind of’ relationship is something where in one class will have an object of another class created in it
Can we use the explicit keyword along with the constructors to prevent implicit conversions
Is it true that The data member of the const object can be changed using the mutable keyword
Is it true that a friend function of a class can never access private data of a class
Is it true that a friend function should mandatorily a member function of the class
Is it true that Forward referencing is a concept where in a friend function can refer a undefined and a undeclared class
Is it true that A friend class of a class can access the data members of the class
Is it true that The dynamic cast operator gives the information about the object at run time
Can we convert a const integer variable to non const variable
Is it true that We don’t have to rewrite the code when we are using composition or inheritance
Is it true that A function that is a friend of a class can access only the public data members of a class
Is it true that If class B is declared as a friend to class A, then class A can access all private & public members of class B
Is it true that templates can’t be used on user defined data type
Is it true that Function template and template functions are similar
Is it true that Macros are more advantageous then templates
Is it true that We get a compilation error if class templates are instantiated using objects
Is it true that The member functions of a template class should mandatorily be defined in the class
Is it true that If there is a function template called fun(), then a specific appropriate version of it would be generated when the fun() is called with a new data type argument
Is it true that template saves memory
Is it true that A function template should mandatorily have only one argument type
Is it true that We get run time error if we set default values to template arguments
Is it true that We get compile time error if function templates are overloaded 


Similar courses

Beginning C++ Programming - From Beginner to Beyond
  • 46 hours
  • 305 lessons
  • Certificate
C++: From Beginner to Expert
  • 18 hours
  • 95 lessons
  • Certificate
Learn C++ From Interview Questions
  • English language

  • Recommended provider

  • Certificate available