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.

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 -Oz40) delete (arr cout void print_arr() { cout void set_arr(int idx, int val) { arr[idx]=val > int get_arr(int idx) return arridx); > }; 11. Can you predict the output of the program below? int main() { Q24 91/"01",0), 2("02",10): q2=91: 91.set_arr(0, 32); 42.set_arr(1, 56); 91.print_arr(); 42.print_arrt); 12. What do the following print? cout (b)? (a) (b)) Please try to use C template coding to replace it 14. Here is C++ example coding Class Person...): Class Student : public Person (...) Void dance(const Person&p): Void study (const Student& s): Person : Students Please point out below which class usage is wrong A dance (p) B. dance (8): C study (s): D. study (p) 15. Write a function to find the second largest number in an array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!