Home / MCQ Bank / Computer
Computer Arrays In Data Structures

What will be the auxiliary space requirement of the following code? #include <bits/stdc++.h> using namespace std; void func(int arr[], int left, int right) { while (left < right) { int temp = arr[left]; arr[left] = arr[right]; arr[right] = temp; left++; right--; } } void printArray(int arr[], int size) { for (int i = 0; i < size; i++) cout << arr[i] << " "; } int main() { int arr[] = {1,4,3,5}; int n = sizeof(arr) / sizeof(arr[0]); func(arr, 0, n-1); printArray(arr, n); return 0; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • O(1)

Related Computer Questions

Which of the following property is used to set the background image of an element? In Java, which of the following is a valid autoboxing conversion? What will be the output of the following Python code snippet? x = [i**+1 for i in range(3)]; print(x); Which of the following is a difference between beaufort cipher and vigenere cipher? When will the window property come into play?