We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Arrays and Strings
- Array Reversal
- Discussions
Array Reversal
Array Reversal
Sort by
recency
|
789 Discussions
|
Please Login in order to post a comment
include
include
int main() {
int x[1000]; int i , j , k ; scanf("%d",&i); for ( j=0 ; j for ( k=j-1 ; k>=0 ; k-- ) { printf("%d\t",x[k]); }
return 0; }
can someone help me out.
why we are using n -1 to reverse the array .
can someone elaborate on it.