Menu

(Solved) : 10 Following Code Snippets Choose Outcome Compiling Running Code Given Options Compile Ti Q36000328 . . .

10. For each of the following code snippets, choose the outcome of compiling and running the code from the given options: A.

d) void myFunct(int* &x)t int* &temp-x; delete temp; int main(0) int* answer- new int; *answer- 42 myFunct(answer); cout<<*

10. For each of the following code snippets, choose the outcome of compiling and running the code from the given options: A. Compile-time error B. Possible or definite segmentation fault C. Memory leak D. None of the above Select all the options that apply a) “‘int main(int argc, char* argv[]) coutくくargc<<argv *くくendl; b)int main0 int* ptrl -new int; *ptr 23; int* ptr2 -ptrl; delete ptrl; delete ptr2; return 0; c) ‘void swap(int*x, int*y) int* temp = x; * y -*temp; delete temp; d) “‘void myFunct(int* &x)t int* &temp-x; delete temp; int main(0) int* answer- new int; *answer- 42 myFunct(answer); cout<<* answerくくendl; return 0; l” Show transcribed image text

Expert Answer


Answer to 10 Following Code Snippets Choose Outcome Compiling Running Code Given Options Compile Ti Q36000328 . . .

OR