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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know about multiple inheritance?

641


What is encapsulation process?

582


What is the types of inheritance?

604


Why do we use encapsulation in oops?

522


Can private class be inherited?

619






What is polymorphism used for?

572


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2008


What polymorphism means?

624


Can you name some types of inheritance?

641


c++ program to swap the objects of two different classes

1765


What is object in oop with example?

704


What is the purpose of polymorphism?

681


What are the three parts of a simple empty class?

1460


Where You Can Use Interface in your Project

1427


What is the difference between encapsulation and polymorphism?

596