-
What is Programming?
-
Programming is the process of taking an Algorithm and Encoding it into a Notation, a Programming language, so that it can be executed by a computer. In simple, Program is a Precise Sequence of steps to solve a particular Problems.
-
What is the difference between C and C++?
-
The major difference between C and C++ is that, C is a Procedural programming language and does not support classes and objects, while C++ is a combination of both procedural and object oriented programming language.
-
What is the difference between Interpreter and compiler
-
The Interpreter and compiler is a program that converts program written in high-level language into machine code. the major difference between them is that, Interpreter translates program one statement at a time, while compiler translate the entire program at once.
-
what is std?
-
Its the default namespace defined by C++. All the entities variables, types, constants, and function of the standard C++ Library are declared within the std namespace.
-
What is Cin?
-
The Predefined object "cin" is an instance of istream class. The cin object is said to be attached to the standard input device, which usually is the keyboard.
-
What is cout?
-
The predefined object "cout" is an instance of ostream class. The cout object is said to be "connected to" the output device, which usually is the display screen.
-
what is variable?
-
Variable is the reserved memory location to store values. While writing a program, we need a space to store some information, so we are using variable to do this task.
-
what is the uses of "Keyword"?
-
The "keyword" is the predefined reserved identifiers to specify the namespace being used in.
-
What is the difference between Local variables and Global Variables?
-
Variables defined inside the function is local variables. A local variable occupies memory only when the variable is in scope.
A Variable defined outside of all functions is known as Global variable. It's not local to any particular functions, so any function of that program can use it.
-
How we can store any string in C++?
-
We can store any string using "char" data type or "string" keyword it self.
-
Can we use "int" data type to store "1.45" ?
-
No we can't. but we can use "float" data type to store floating point numbers.
-
What is Loop in C++?
-
Loops are used to perform a set of instructions repeatedly. Loops allow us to to perform statements repeatedly and just as importantly, to stop the action when warranted.
-
What's is the difference between while loop and do-while loop?
-
While-loop repeats a statement or group or statements while a given condition is true. it test the condition before executing the loop body. in other side, The do-while loop checks the condition at the bottom of the loop and is guaranteed to execute at least one time.
-
why we use "Break" Statement in C++?
-
We are using "break" in loops to interrupt the flow of control. whenever we need to bypass the Natural ending of statements, we use "break".
-
What do you mean by "goto"?
-
A goto statement provides an unconditional jump from the "goto" to a labeled statement in the same function.
-
What happen, if we pass the arguments to function by value?
-
Whenever we pass the arguments by value to function, the actual parameter is copied to the formal parameter for the purpose of executing the function's code. as the function working on a copy of the actual parameter, so this changing can't affect the actual parameter.
-
What is pointer?
-
It's kind a variable, which can store the Memory address of another variables. pointer store the memory address of variable, not the value of that variable.
-
What's is reference variable?
-
Reference is another name for an already existing variable. Once a reference is initialized with a variable, either the variable Name or the Reference name may be used to refer to the variable.
-
How we can use "time" function in our C++ program?
-
We need to include a library "ctime" to use any time function in our program.
-
why we need Data-structure in our program?
-
Structure is the collection of one or more variable types. we used structure to represent a record like Our books in the Library etc.
-
What you mean by OOP?
-
OOP means object Oriented Programming, it's the Only feature that distinguish C++ from C.
-
What is Classes?
-
Class is a blueprint for any functional entity which defines its properties and its functions. like human being, having body parts, and performing various actions.
-
Define Data Abstraction.
-
Abstraction means, showcasing only the required things to the outside world while hiding the details.
-
What is Encapsulation?
-
Encapsulation is an object oriented programming concept that binds together the data and functions that manipulate the data, and that keeps both safe from outside interface and misuse.
-
What is Inheritance?
-
Inheritance in OOP can be described as a process of creating new classes from existing classes. New classes inherit some of the properties and behavior of the existing classes.
-
Define Polymorphism?
-
The word polymorphism means having many forms. Typically, polymorphism occurs when there is a hierarchy of classes and they are related by inheritance. C++ polymorphism means that a call to a member function will cause a different function to be executed depending on the type of object that invokes the function.
-
What is Friend Class?
-
A class member can access other class members, if we declare the class as friend of other class.
-
What is Virtual Function?
-
A Virtual function is a function that is Declared as Virtual in a Base class and redefined in one or more derived classes. Thus, each derived class can have its own version of a virtual function.
-
What is Object?
-
Class is a collection of data member and member function. Class is a user define data type. Object is a class type variable. Objects are also called instance of the class. Each object contains all members(variables and functions) declared in the class.
-
What is an inline function?
-
The inline functions are a C++ enhancement feature to increase the execution time of a program. Functions can be instructed to compiler to make them inline so that compiler can replace those function definition wherever those are being called
-
What is the pure virtual Function?
-
A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class if the derived class is not abstract. Classes containing pure virtual methods are termed "abstract" and they cannot be instantiated directly.
-
What is Abstract Class?
-
An abstract class is a class that is designed to be specifically used as a base class. An abstract class contains at least one pure virtual function.
-
What is function Overloading?
-
Function overloading is a programming concept that allows programmers to define two or more functions with the same name. Each function has a unique signature , which is derived from: function/procedure name. number of arguments. arguments' type.
-
What is Operator Overloading?
-
Operator overloading is a specific case of polymorphism in which some or all operators like +, = or == are treated as polymorphic functions and as such have different behaviors depending on the types of its arguments.
-
What is constructor?
-
A constructor is a kind of member function that initializes an instance of its class. A constructor has the same name as the class and no return value. A constructor can have any number of parameters and a class may have any number of overloaded constructors.
-
What is Destructor?
-
A destructor is a special member function that is called when the lifetime of an object ends. The purpose of the destructor is to free the resources that the object may have acquired during its lifetime.
-
What is malloc()?
-
Malloc() is the function in C Library. we use this function to allocate the memory dynamically.
-
What is namespce?
-
A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. Namespaces are used to organize code into logical groups and to prevent name collisions that can occur especially when your code base includes multiple libraries.
-
Which operator can be allocate memory dynamically?
-
We can use "New" Operator to allocate memory dynamically.
-
Explain "This" pointer?
-
The ‘this’ pointer is passed as a hidden argument to all non static member function calls and is available as a local variable within the body of all non static functions. ‘this’ pointer is a constant pointer that holds the memory address of the current object. ‘this’ pointer is not available in static member functions as static member functions can be called without any object (with class name).