Select the correct option to test your answer:
More Computer Questions
What is the output for the following code? #include <bits/stdc++.h> using namespace std; void convert(int a[], int n) { vector <pair<int, int> > vec; for (int i = 0; i < n; i++) vec.push_back(make_pair(a[i], i)); sort(vec.begin(), vec.end()); for (int i=0; i<n; i++) a[vec[i].second] = i; } void printArr(int a[], int n) { for (int i=0; i<n; i++) cout << a[i] << " "; } int main() { int arr[] = {10,8,2,5,7}; int n = sizeof(arr)/sizeof(arr[0]); convert(arr , n); printArr(arr, n); return 0; }
Operators with the same precedence are evaluated in which manner?
What is it called where object has its own lifecycle and child object cannot belong to another parent object?
In C++, which function cannot be inherited but can be overridden in a derived class?
Which of the following is a correlated subquery?