What will do the following code?
C++
void fun( int arr[], int n)
{ for ( int i = 0; i < n; i++) {
for ( int j = i; j < n; j++) {
for ( int k = i; k <= j; k++)
cout << arr[k] << " " ;
cout << endl;
}
}
} |
(A)
Prints the subsequence of the article.
(B)
Prints the elements of the array
(C)
Prints the subarray of the element.
(D)
None
Answer: (C)
Explanation:
The above code will print subarray of the elements.
Hence the correct option is(C).
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Uncategorized
Recommended Articles