C Program to reversing an Array Elements in C Programming.

 #include <stdio.h>

int main(){

    int i,number,arr[20];

    printf("enter the value of array= ");

    scanf("%d",&number);

    printf("the %d values are =",number);

    for(i=0;i<number;i++){

        scanf("%d",&arr[i]);

    }

    printf("the reverse array is =");

    for(i=number-1;i>=0;i--){

        printf("%d ",arr[i]);

    }

    return 0;

    

}

No comments:

Post a Comment

Programming in C Language

  PROGRAM LIST TO BECOME PRO IN C    😍😍😍            PRACTICE SETS                                                        UNIT -1  👇   IN...