Question: Consider the following program, where are x, y and z are stored in main memory partition? A. x is stored on the heap memory partition,

Consider the following program, where are x, y and z are stored in main memory partition?

int y; int main () { int z = 0; int *x

A. x is stored on the heap memory partition, y is stored on the global partition and z is stored on stack partition. 

B. x, y and z variables are stored on the stack partition. 

C. x is stored on the heap memory, y and z variables are stored on stack partition. 

D. x and y are stored on the heap memory partition and z is stored on stack partition.

int y; int main () { int z = 0; int *x = int * malloc( sizeof (int)); }

Step by Step Solution

3.29 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A Explanation For x variable dynamic memory get... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Data Structures and Other Objects Using Java Questions!