When you define a integer it gets stored in which data
structure?(Stack or a heap)

Answers were Sorted based on User's Feedback



When you define a integer it gets stored in which data structure?(Stack or a heap)..

Answer / smikesh

Stack

Is This Answer Correct ?    9 Yes 3 No

When you define a integer it gets stored in which data structure?(Stack or a heap)..

Answer / shyam

Depends on where the integer is declared. If it s declared in a block it goes into stack.

If it s an static or global variable, it will not be stored in stack. It ll be stored in data segment of the running program.

Integer will never be stored in heap... never...

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More OOPS Interview Questions

Out of 4 concepts, which 3 C++ Follow?

1 Answers   TCS,


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

0 Answers   UBS,


How do you make derived class as an abstract class?

1 Answers   Convergys, TCS,


How compiler selects(internally) required overridden function in inheritance?

2 Answers   CSC, Infinite Computer Solutions,


Difference between over loading and over ridding?

12 Answers   CTS, Patni, Softvision Solution,






Why multiple inheritance is not possible?

0 Answers  


difference between abstraction and encapsulation with progarammatic eg. hi,just recently i went for an interview .The interviewer asked what is the difference between abstraction and encapsulation with programmatic eg. I gave the answer as encapsulation mean hiding the relevant data which is not useful for the user, eg a electric fan .hiding the information how the electricity is converted into machanical energy. abtraction showing only the relevant data to the user eg electric fan. it look ,its color ,it design etc only relevant data. Then the interviewer asked me, give me some programmic eg .I Said Let assume a web form having control like textbox,button etc. The user can view textbox,button etc this is the eg of abstraction and when the user click on the button how he is redirected is not known by the user is the eg of the encapsulation. Am I Correct .was the answer given by me is perfect .now i am planing to go for an another interview should i give the same answer.IF not please suggest me a better answer.with some good eg Please help

1 Answers  


What is ambiguity in inheritance?

0 Answers  


i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????

4 Answers  


What is the use of fflush(stdin) in c++?

4 Answers   HCL,


what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me

1 Answers  


why c++ is a highlevel language

3 Answers   Satyam, Tech Mahindra,


Categories