Question: 5 Given a function func(): void func() static int val > The variable val is belonged to which store address? A. Initialized Data segment B.




5 Given a function func(): void func() static int val > The variable "val is belonged to which store address? A. Initialized Data segment B. Uninitialized data or BSS segment C. Heap D. Stack 6. The character A,B,C,D,E pushes into stack order follows ABCDE. What is possible order for character A,B,C,D,E pop out from stack ? A EDCBA; B. DECBA; C DCEAB: D ABCDE 7. #define DOUBLE(X)x+x: + 5*DOUBLE(5): (What is :)? 8. What is the result of Test(void)? void GetMemory(charp) p = (char*)malloc(100): void Test(void) char *str = NULL; GetMemory(str); strcpy(str "hello world"); printf(str); 1 9. What is the result of Test(void)? char "GetMemory(void) char pl] = "hello world": return p: > void Testvold) char str = NULL; str = GetMemory: printf(str): 10 Given that class Oz4 enum( arr_l=5 ) int arr. // array of int int seed; char *name: public: Q24(char "str, inti): name(str), seed(1) { arr = new int[arr 1); for(int i=0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
