Advertisement Remove all ads

Look at the Following C++ Code and Find the Possible Output from the Options (I) to (Iv) Following It. Also, Write the Highest and Lowest Values that Can Be Assigned to the Array A. - Computer Science (C++)

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads

Look at the following C++ code and find the possible output from the options (i) to (iv) following it. Also, write the highest and lowest values that can be assigned to the array A.


  • Assume all the required header files are already being included in the code
  • The function random(n) generates an integer between 0 and -1
void main()
   int A(4], C;
   for(C=0; C<4; C++)
      A(C] = random(C+l) + 10;
   for (C=3; C >= 0; c--)

1) [email protected]@[email protected]@

2) 15$14$12$10$

3) [email protected]@[email protected]@

4) [email protected]@[email protected]@

Advertisement Remove all ads
Concept: Pointers and Arrays - Array of Pointers, Pointer to an Array (1 Dimensional Array), Function Returning a Pointer, Reference Variables and Use of Alias
  Is there an error in this question or solution?
Advertisement Remove all ads

View all notifications

      Forgot password?
View in app×