Saved Bookmarks
| 1. |
Look at the following C++ code and find the possible output(s) from the options (i) to (iv) following it. Also, write the highest and lowest values that can be assigned in the array A. Note :Assume all the required header files are already being included in the code.The function random(n) generates an integer between 0 and n -1.void main(){ randomize(); int A[4], C; for(C=0: C<4; c++)A[C]= random(C+1) + 10; for(C=3; C>=0; C--)cout<<A[c]<<"@";} |
|
Answer» The possible output is (iv) [email protected]@[email protected] The highest value of array A = 14 The lowest value of array A = 11 |
|