Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Reverse order of array items

#include <stdio.h>

#define N 5

int main(){
    
    int a[N] = {'a','b','c','d','e'
    }, *p;
    for(p = &a[N-1]; p >= a; p--){
        printf("%c", *p);
    }

    return 0;
}

//Print the elemnts of the array in reversed order

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.