1.

Write A Code To Check Whether A Stack Grows Upwards Or Downwards?

Answer»

void checkStack()

{

INT i=2;

int j=3;

if(&i > &j) printf("stack grown DOWNWARDS");

ELSE printf("stack grows upwards");

}

define 2 local variables one after other and try to PRINT the address

void checkStack()

{

int i=2;

int j=3;

if(&i > &j) printf("stack grown downwards");

else printf("stack grows upwards");

}

define 2 local variables one after other and try to print the address



Discussion

No Comment Found