| Back to Questions Page |
| |
| Question |
In multilevel inheritance constructors will be executed
from the .... class to ... class |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Constructors are always executed from the parent to child
ie in the example below:
#include <iostream>
using namespace std;
class base1
{
public:
base1()
{
cout<<"In constructor of base1"<<endl;
}
~base1()
{
cout<<"In destructor of base1"<<endl;
}
};
class base2:public base1
{
public:
base2()
{
cout<<"In constructor of base2"<<endl;
}
~base2()
{
cout<<"In destructor of base2"<<endl;
}
};
class derived :public base2
{
public:
derived()
{
cout<<"In constructor of derived"<<endl;
}
~derived()
{
cout<<"In destructor of derived"<<endl;
}
};
void main()
{
base1 b1;
base2 b2;
derived d1;
}
o/p:
In constructor of base1 --- for object b1
In constructor of base1 --- for object b2
In constructor of base2-----
In constructor of base1-for object d1
In constructor of base2
In constructor of derived  |
| Ps |
| |
| |
| Question |
WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT
from an NIIT CENTRE?? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tanuja |
| This Interview Question Asked @ Biocon , MIT |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | There is no guaranteed job available. Infact GNIIT gives
you only job assistance. Only and Only if you perform well
you would be placed. It doesnot matter whether it is GNIIT
from NIIT or ACCP from Aptech.  |
| Mamta |
| |
| |
| Question |
why we call c++ is object oriented lanaguage |
Rank |
Answer Posted By |
|
Question Submitted By :: Mail |
| This Interview Question Asked @ HCL , Hcl |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | if a language (supports)follows ObjectOrientedProgramming
concepts we can say it is a Object Oriented Programming.
Object Oriented Programing Concepts are:
1.class
2.object
3.Data Abstraction
4.Encapsulation
5.Polymorphism
6.Inheritnace
7.Message Communication  |
| Madhu Kalla |
| |
| |
|
|
| |
| Answer | Since it obeys OOPs concepts,it is said to be object
oriented language....  |
| Viji |
| |
| |
| Question |
what is virtual function in c++ |
Rank |
Answer Posted By |
|
Question Submitted By :: Natasekhar4u |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | virtual funtion in cpp is define as globle acess in the
variable.
 |
| Guest |
| |
| |
| Answer | the concept of vitual function comes when inheritance is at
work. If the overriden function is not made virtual in base
class , then pointer of derived class will call the funtion
in base class(instead it should have called the one from
derived class.)
this is why we make the function in base as virtual.  |
| Achal [NIPUNA Technologies] |
| |
| |
| Answer | virtual function comes into picture while inheriting the
base class functions to the derived class functions.
ifthe virtual isnot used then the pointer of derived class
points to the baseclass function  |
| Sree [NIPUNA Technologies] |
| |
| |
| Answer | IT'S OVERRIDING A BASE CLASS DEFINITION AT RUN TIME.MEMBER
FUNCTION IN BASE CLASS AND DERIVED CLASS IS SAME. NORMALLY
IT INVOKE THE BASE CLASS DEFINITION IF BOTH FUNCTION NAME
IS SAME.BUT WE NEED TO ACCESS THE DERIVED CLASS DEFINITION
WE GO FOR VIRTUAL FUNCTION  |
| Indu [NIPUNA Technologies] |
| |
| |
| Question |
WHAT IS ABSTRUCT DATA TYPE ?
PLEASE EXPLAIN IT. |
Rank |
Answer Posted By |
|
Question Submitted By :: Deepak Pareek |
| This Interview Question Asked @ HCL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A unique datatype, that is defined by the progrmer.It may
refer to an object class in OOP or to a special data type in
traditional,non-OOP languages.
ADT is a specification of a set of data and the set of
operations that can be performed on the data.This supports
the principle of INFORMATION HIDING.  |
| Purush |
| |
| |
| Question |
WHAT IS THE DIFFERENCE BETWEEN ABSTRUCTION AND
ENCAPSULATION?
PLEASE EXPLAIN IT.
|
Rank |
Answer Posted By |
|
Question Submitted By :: Deepak Pareek |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | ABSTRUCTION:
Process of providing the neccesary properties & operations
of an object is called as abstuction
Example take car the car user only know things reqired.
he don't no the internal functionality of the car b'coz it
is not required for the user .
properties like car:colour,number,model etc.
operations like car:move front,backetc.
ENCAPSULATION:
Process of providing all the properties&operayion of entity
in one place is called as encapsulation.
In java operations are called as methods,properties are
called as variables.
The place where you were write the variables &properties is
called as class.  |
| Mahesh_b.tech@2008 |
| |
| |
| Answer | ABSTRACTION
An abstract class is a parent class that allows inheritance
but can never be instantiated. Abstract classes contain one
or more abstract methods that do not have implementation.
Abstract classes allow specialization of inherited classes.
ENCAPSULATION:
Wrapping up of data into a single unit..  |
| Ganesh |
| |
| |
| Answer | In C++ terms, abstraction is achieved by access modifiers:
private and protected. Encapsulation is achieved by classes
Vikas
http://www.cppquestions.com/  |
| Vikas |
| |
| |
| Question |
How is data security provided in Object Oriented languages?
? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | using class  |
| Channu |
| |
| |
| Answer | in object oriented languages emphasis is laid on not to
have any global code(functions or variables.) Everything is
encapsulated inside the body of a class.
The objects of the class can access only the public members
of class. So the data mambers are more secure.  |
| Achal |
| |
| |
| Answer | In c++,
Data is encapsulated(hidden) in the form of specifiers such as:
private: accessible only to members of class.
public: accessible everywhere.
protected :accessible only to the members that are
inherited(see inheritance)  |
| Guest |
| |
| |
| Question |
wht is major diff b/w c and c++? |
Rank |
Answer Posted By |
|
Question Submitted By :: Sntcsanthosh |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | c is procedural oriented language and C++ is a object
oriented language.
In C++ we can create object and its properties where as in C
functions are used.  |
| Dng |
| |
| |
| Answer | in c we can use if statements only for 16times but in c++ ,
we can use if for 256 times.
in c it's difficult to solve complex no but in c++ we can
solve easily by using classes.
c follows down to up approach to complie a program but
c++ follow up to down approach.
in c++ we can add variables any where within the program
but in c data type are declared only on the starting of the
function or the main program.  |
| Narender Vadhava [NTTF] |
| |
| |
| Answer | In C Lan is middle level lan. but c++ High level lag becoze
C lan. 25 % code is written in Assembly lag .
C is faster compair to c++ becoze c 25 % code Written in
Assembly Lag.that reason its is faster .  |
| Ashutosh Soni [NTTF] |
| |
| |
| Question |
What are the advantanges of modularity |
Rank |
Answer Posted By |
|
Question Submitted By :: JEFFOH |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Modularity means to divide a program into smaller units
into modules as we do in c to make functions.
It help us to write a large program, easily to handle a
complex problem by dividing into modules.
it is also helpful to give a good and easy look to our
lengthy program  |
| Narender Vadhava |
| |
| |
| Answer | Actually, the main advantage of modularity is reusability.
By dividing a complex problem into modules and implementing
them differently, reusability can be achieved as these
modules can be used when need for same task arises in a
similar problem.
Also, ofcourse modularity increases code legibility and it
is an efficient way of handling difficult and lengthy tasks
by dividing each module responsibilty amongst various
developers.  |
| Kanthi |
| |
| |
| Question |
what is multithreading in c++ ,
what is difference between multithreading and
singlethreading.
|
Rank |
Answer Posted By |
|
Question Submitted By :: Nagireddyc |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Multithreading in c++???
As far as i know, c++ does not provide any language level
support for multithreading. If it is to be implemented
using c++, then it cannot be done without the support of
the underlying operating system which makes things a little
more complicated, unlike java, where a language level
support is provided for the same.
And, difference between multithreading and single-
threading: Multithreading is one form of multitasking where
a single big task is divided into independent, simultaneous
operations which can run together so that subtasks
independent of eachother can be implemented at once to
improve efficiency.  |
| Kanthi |
| |
| |
| Question |
what is difference b/w object based and object oriented
programming language? |
Rank |
Answer Posted By |
|
Question Submitted By :: Krajeshsap |
| This Interview Question Asked @ Infosys , IBM |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Object based programming language supports all the features
of OOP except Inheritence  |
| Uv |
| |
| |
| Answer | object based programming do not support the vital two
features of object oriented language..which are inheritance
and polymorphism  |
| Bappaditya [Honingsoluations Pvt.ltd] |
| |
| |
| Question |
What is the differances between a abstract calss and
interface |
Rank |
Answer Posted By |
|
Question Submitted By :: Skiran_81 |
| This Interview Question Asked @ Aviva , Aviva, Symphony |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | An abstract class holds both method prototpypes and method
definitions also...But it is not in the case of
interface..It can contain only protypes.. It should be
defined only where it is implemented...  |
| Maria Alex |
| |
| |
| Answer | Abstract base classes can have data members but not interfaces.
Abstract base classes have private access specifier by
default while that of interfaces is public  |
| Abhijit [AVIVA Global Services] |
| |
| |
|
| |
|
Back to Questions Page |