Skip to content

Conversation

@Jitankasarkar
Copy link

No description provided.

Copy link

@Ulton321 Ulton321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Areas for Improvement
Uninitialized N Macro
int arr[N]; is used, but N is not defined, which may cause a compilation error.
Fix: Either define #define N 100 or dynamically allocate the array.

You can try this new logic

 int temp; for (i = 0; i < num / 2; i++) { temp = (int) *(arr + num - i - 1); *(arr + num - i - 1) = *(arr + i); *(arr + i) = temp; } 
}

// printing the reversed array
printf("eversed array:\n");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed typo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"eversed array" → "Reversed array"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants