Reversing the Array
Reversing the Array
Write a program to takeย input of integer array of size 5 and display the array in reverse order
Solution:
#include<stdio.h>
int main(){
int arr[4];
printf(“Enter the 5 elements\n”);
// Taking input of 5 element
for(int i=0;i<=4;i++){
scanf(“%d”,&arr[i]);
}
//Printing the Array
printf(“Array entered by you:\n”);
for(int j=0;j<=4;j++){
printf(“%d \t”,arr[j]);
}
//Printing the array is reverse order
printf(“\nThe reverse of the array:\n”);
for(int k=4;k>=0;k–){
printf(“%d \t”,arr[k]);
}
return 0;
}
Topics Covered :
- reverse array
- reverse an array
- reverse array in java
- how to reverse an array
- reverse an array in java
- reverse values in array java
- reverse elements in an array java
- how to reverse array in java
- reverse elements in array in java
- how to reverse an array in java
- java program to reverse an array
- reverse elements of array in java
- how to reverse elements in an array in java
- reverse order of elements in array java
- program to reverse an array in java
- array
- coding
Thanks for reading this blog. Hope you get satisfied with the blog and definitely this blog must have valued your time and effort of reading.
Take a time to connect our other digital creations such as Instagram , Facebook and Youtube.
ย Social Mediaย Linksย ofย Tech DCodeย :
ย YouTube :ย https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
ย Instagram :ย https://www.instagram.com/thetechdcode/
ย Facebook Page :ย https://www.facebook.com/thetechdcode
ย Twitter :ย https://twitter.com/thetechdcode
ย Telegram Channel :ย https://t.me/thetechdcode
ย Tech DCode Linktree :ย https://linktr.ee/thetechdcode
ย My Personal Handles :ย https://linktr.ee/virtualshivamin
ย Social Media Linksย ofย SHIVAM SINGHย (OWNER) :
ย Instagram :ย https://www.instagram.com/virtualshivamin/
ย Facebook Page :ย https://www.facebook.com/virtualshivamin/
ย Twitter :ย https://twitter.com/virtualshivamin/
ย Personal Linktree :ย https://linktr.ee/virtualshivaminย