| Back to Questions Page |
| |
| Question |
What is public, protected, private? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
| This Interview Question Asked @ Satyam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | public:
public is an access specifier which can be used throughout
the program.
protected:
protected is an access specifier which can be used in the
specified class and its derived class...
private:
private is an access speifier which can be used whithin the
class in which it is declared.  |
| Khadeer.k |
| |
| |
| Answer | public:
public is an access specifier which can be used throughout
the program.
protected:
protected is an access specifier which can be used in the
specified class and its derived class...
private:
private is an access speifier which can be used whithin the
class in which it is declared.
These three access specifiers are used for providing the
security  |
| Yughandhar |
| |
| |
| Answer | public,protected,private are access modifiers where public
is used for acess the methods and variables to unlimited
extent.
private:is used to access the variables upto the enclosing
region
protected:and it is limited to class itself or classes that
are derived  |
| Prashanth |
| |
| |
|
|
| |
| Answer | they are acceses specifieres.
these are used for security purpose  |
| Yughandhar |
| |
| |
| Question |
What is the difference between class and structure? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | structure is a value type class is reference type,
struct Memory will be on stack and class Memory stored on
Heap,
struct not suports inheritance and class can?
 |
| Guest |
| |
| |
| Answer | By default the members of struct are public.
By default the members of class are priavte.
When an object is created to a class, constructor will be
called automatically.
But not in struct (if structure having member function with
structure name)  |
| Mohan |
| |
| |
| Answer | class is a slow access because of heap memory. But struct
is a faster in access because of stack memory.
values are initialize at the time of declaration in class
but not in struct.  |
| Konankiswetha |
| |
| |
| Question |
What is the difference between an object and a class? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | An Object is an instance of the class  |
| Ven |
| |
| |
| Answer | Object is a runtime entity of a class  |
| Nk |
| |
| |
| Question |
What is an object? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
| This Interview Question Asked @ HCL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | object is an instance ok a class through which we can access
class member and data.  |
| Shivanand |
| |
| |
| Answer | an instance of a class is called an object...  |
| Hima Bindu |
| |
| |
| Answer | object is nothing but which is existing in the real world
and it has some properties,methods  |
| Jagath |
| |
| |
| Answer | object is a real time entity it has state,behavior
ex;animals,vechiles  |
| Devender |
| |
| |
| Answer | object is a software bundle of related state and
behavior.it is a instance of a class.all are real world
entity.  |
| Pasu Nayan |
| |
| |
| Answer | In Object Oriented programming Object is a run time
entity(requirement) that binds the methods and data(this
methods are operated with that binded data)together.  |
| Srikanth Gunnala |
| |
| |
| Answer | object is a variable of data type class  |
| Rinku |
| |
| |
| Question |
What is a class? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
| This Interview Question Asked @ TCS , Infosys, Vcxv, Thylak |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | a class is a logical existence of a data containing data
variables and member functions having relations between
them.  |
| Kiran Kumar.b |
| |
| |
| Answer | the wrapping up of data and functions into a single unit is
defined as the class  |
| Anandan |
| |
| |
| Answer | In general a class is a group of objects. for example
mango,apple, banana, grapes etc. is a group of fruits.
But in oops concept, a class is a collection of member data
and member function.  |
| Kumar Vishal |
| |
| |
| Answer | Collection of data members(Varibles) and methods(functions)
is called class  |
| Madasamy.k |
| |
| |
| Answer | class is a generalisation or mould or template of an object.  |
| K.premalatha |
| |
| |
| Answer | A class is USER DEFINE DATA TYPE.  |
| Nayan Patel |
| |
| |
| Answer | a class is a collection of objects which contains variables
and functions...  |
| Khadeer.k |
| |
| |
| Answer | Class is the Collection of Methods and Datafield, in other
word we can say class is user defined Data Types  |
| Vijai Prakash Maurya |
| |
| |
| Answer | Class is an user defined datatype where variable and
related code where incorporated  |
| Ganesh |
| |
| |
| Answer | class is a collection of object.  |
| Laxman |
| |
| |
| Answer | In OOPS, a class is the defination of an object.The class
can contain both the charactertics and function of the
object.Simply we say it contains member variables and
member function.It is a well defined object  |
| Ramu.m |
| |
| |
| Answer | A class is a set of objects.  |
| Rajeshkannan.g |
| |
| |
| Answer | class is a template that combines both data and function
into a single unit.  |
| Kalpana.t |
| |
| |
| Answer | a class is a set of objects.for ex define a class birds, it
will contain thec group of birds with diffrent names like
parrot,crow,peacock etc.  |
| Bhagavathi Chouhan |
| |
| |
| Answer | a class is a set of objects.  |
| G.rajesh Kannan From Ccet |
| |
| |
| Answer | A class is a template or a blueprint of a user-defined type
which can contain data and methods.  |
| Hima |
| |
| |
| Answer | A class is group of logically related data item.It has
function of properties and methods.
A class is a blue print of objects.  |
| Veera Theavn.m |
| |
| |
| Question |
const char *
char * const
What is the differnce between the above two? |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | const char * makes the data constant
char * constant makes the pointer constant  |
| Karthik Natarajan |
| |
| |
| Answer | const char* is a constant pointer and char * const is
poiter to constant.  |
| Chithra |
| |
| |
| Answer | we can assign char as a constant but we cannot assign
constant as a character  |
| Priya |
| |
| |
| Answer | both are has a same meaning  |
| Priya |
| |
| |
| Answer | const char * is the pointer to a consant variable.
char * constant is a constant pointer to a char.  |
| Beula |
| |
| |
| Answer | both are same  |
| Jeeva |
| |
| |
| Answer | char * const, the pointer is declared as constant.
const char *, the pointer is not constant.  |
| Atreyee |
| |
| |
| Answer | const char *s; is a non-const pointer to const char
char * const s; is a const pointer to non-const char
Once u assign a value to the const poinet it cannot be
reassigned another value till u use casting techniques..
char a = 'A';
char b = 'B';
char *const c = &a;
c = &b; //flags an errror
const char *s = &a;
s = &b //works  |
| P S |
| |
| |
| Question |
wrong statement about c++
a)code removably
b)encapsulation of data and code
c)program easy maintenance
d)program runs faster |
Rank |
Answer Posted By |
|
Question Submitted By :: Tribhuvan Sharma |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | encapsulation of data and code  |
| Chithra |
| |
| |
| Answer | program run faster  |
| Priya |
| |
| |
| Answer | program run faster  |
| Priya |
| |
| |
| Answer | program easy maintenance  |
| Pooja |
| |
| |
| Answer | code removably  |
| Subitha |
| |
| |
| Answer | code removably  |
| Ranjit |
| |
| |
| Answer | code removable  |
| Jitendra |
| |
| |
| Answer | code removably  |
| Prakash |
| |
| |
| Question |
what is an instance of a class |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | object  |
| Guest |
| |
| |
| Answer | Number of entities,called objects are the instances of the
class.  |
| Sandeep |
| |
| |
| Question |
what is pulse code modulation?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Wipro |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | name of the process for the conversion of analog signal
into digital signal  |
| Ramandeep |
| |
| |
| Question |
//what is wrong with the programme??
#include<iostream.h>
template <class first>
class dd
{
first i;
public:
void set();
void print();
};
void dd< first>:: set()
{
cin>>i;
}
void dd< first>::print()
{
cout<<"\n"<<i;
}
void main()
{
dd <char>g;
g.set();
g.print();
} |
Rank |
Answer Posted By |
|
Question Submitted By :: Ramu |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | template<class first> void dd<first>::set()
{
cin>>i;
}
template<class first> void dd<first>::print()
{
cout<<"\n"<<i;
}  |
| Prakash |
| |
| |
| Question |
who is the founder of c++? |
Rank |
Answer Posted By |
|
Question Submitted By :: Sandeep |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Bjarne Stroustrup  |
| Ven |
| |
| |
| Question |
tell me about yourself ?i want answer for frehers with
various exasmples? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ HCL |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | I am Sanish Joseph.I completed my B.TECH in NSS COLLEGE
PALAKKAD,Kerala in Electronics and Communication engineering.
After completing B_Tech I did ANIIT course from NIIT.In that
course I learned SQL,C++,J2SE,J2EE,VB.NET and ASP.NET.I did
my 10th and +2 in St.Thomas CHSS Thrissur.My hobbies are
drawing painting and listen to music.About my family ,my
parents are teachers and my brother is working in HCL as a
software Engineer.And I want to acquire a challenging
position where I can contribute my technical,logical and
software skills as a professional. dats al...  |
| Sanish Joseph |
| |
| |
| Answer | I'm Leo.Now i'm undergoing MCA in St.joseph's
college,Trichy.My strengths r
Optimistic,Dedication,Teamwork,Respect others.My favourite
area is OOP's.And I did ONLINE SHARE MARKET as my mini
project in JSP(J2EE)platform.I'm a self motive person.I
was university football player in my UG.So that i mentioned
ealier that i'm a good teamworker.  |
| Leo |
| |
| |
| Question |
what is object slicing?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Soumya_830312 |
| This Interview Question Asked @ Wipro , L |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | When an base class is assinged to its derived class the
base class takes up only the base member data leaving the
data members of derived class.this is called...  |
| Soumya_830312 |
| |
| |
| Answer | When a Derived Class object is assigned to Base class, the
base class' contents in the derived object are copied to
the base class leaving behind the derived class specific
contents. This is referred as Object Slicing.
Class Base
{
public:
int i;
};
class Derived : public Base
{
public:
int j;
};
int main()
{
Base Bobj;
Derived Dobj;
Bobj = Dobj; //Here Dobj contains both i and j.
//But only i is copied to Bobj.
}  |
| Rsn |
| |
| |
| Answer | object slicing is the phenomenon in which when we assigned
derived class with base class ,the separation of base class
data members from derived class data members occur.  |
| Susanta (rcm) |
| |
| |
| Answer | if an object of a derived class is assigned to a base class
object,the compiler accepts it.but it copies only the base
portion of the object
class base
{
public:
int i,j;
};
class derived : public base
{
private:
int k;
};
int main()
{
base b;
derived d;
b=d;
return o;
}
here b contains i and j where as d contains i,j&k.On
assignment only i and j of the d get copied into i and j of
b. k doesnot be copied. on the effect object d got sliced.  |
| Debashis Mishra,india,orissa |
| |
| |
| Question |
write a piece of c++ code which allocate memory to the 50
object of type CObj
|
Rank |
Answer Posted By |
|
Question Submitted By :: Rohit |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | #include<iostream.h>
class CObj
{
};
int main()
{
CObj **obj=new CObj *[50];
for(i=0;i<50;i++)
{
obj[i]=new Cobj[10];
}
}
 |
| Santhosh K |
| |
| |
| Answer | CObj *obj = new CObj [50];  |
| Tara |
| |
| |
| Question |
if 4-5 year old brother is standing on d roof with me and
watching d moon, suddenly moon coverd by cloud then how
will i explain d hiding of moon to my brother. |
Rank |
Answer Posted By |
|
Question Submitted By :: Jeetu |
| This Interview Question Asked @ MBT |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | i will explain moon feels sleepy so moon went to sleep by
covering clouds as a bed sheet.  |
| Karthickrajan |
| |
| |
| Answer | i will tell him moon is powerful like u and trying to find
the way as u play hide and seek  |
| Isha |
| |
| |
| Answer | I'd explain that moon is far far away and 'clouds' are
closer than moon. You can always see the things that are in
the path of your sight..  |
| Cnu |
| |
| |
| Answer | I'd say clouds are a layer of abstraction, we are observers.
This phenomenon can best be explained by relation of
aggregation, the life time of the moon is not controllable
from clouds, cloud dosnt have any method.
moon died, quite late, so lets go to bed and sleep. The MBT
people are running out of knowledge. Instead they should ask
to write an essay about software piracy  |
| Godzilla |
| |
| |
| Answer | itell to my brother moon covered by cloud like as the
mother is take care of her baby.  |
| Ramya |
| |
| |
| Answer | moon is covered by cloud as our mother takes care of us.  |
| Ramya |
| |
| |
|
| |
|
Back to Questions Page |