Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a function to reverse an integer array {9, 2, 3, 5, 7}.

Medium

Problem Statement

Write a function to reverse an integer array {9, 2, 3, 5, 7}.

Sample Input

9 2 3 5 7

Sample Output

7 5 3 2 9 

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> void reverseArray(int arr[], int n) { // Your code here } int main() { int arr[] = {9, 2, 3, 5, 7}; reverseArray(arr, 5); for (int i = 0; i < 5; i++) { printf("%d ", arr[i]); } printf("\n"); return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
9 2 3 5 7
Expected Output
7 5 3 2 9