Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

SOURCE CODE: #include<stdio.h> #include<conio.

h> int main(void) { int element,i,arr[100],temp; printf("Enter the element in array: "); scanf("%d",&element); for(i=0;i<element;i++) { printf("Enter the number: "); scanf("%d",&arr[i]); } for(i=1;i<element/2;i++) { temp = arr[i]; arr[i] = arr[element-1-i]; arr[element-1-i] = temp; } for(i=0;i<element;i++) { printf("arr[%d]= %d\n", i,arr[i]); } getch(); } OUTPUT:

You might also like