write a program to display the array elements in reverse
order in c language
Answer Posted / siraj-ud-doulla
#include<stdio.h>
int main()
{
int n,i;
printf("How many number you get \n:");
scanf("%d",&n);
int arr[n];
printf("You need %d numbers\n",n);
for(i=0;i<n;i++){
scanf("%d",&arr[i]);
}
printf("Revarse number is:\n");
for(i=n-1;i>=0;i--){
printf("%d\n",arr[i]);
}
return 0;
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Why is c so important?
What is adt in c programming?
How can you call a function, given its name as a string?
Can you please explain the scope of static variables?
why do some people write if(0 == x) instead of if(x == 0)?
What is dangling pointer in c?
Write a C program to count the number of email on text
Place the #include statement must be written in the program?
Why is #define used?
write a c program to find the sum of five entered numbers using an array named number
write a program to print largest number of each row of a 2D array
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Who invented b language?
What is the use of void pointer and null pointer in c language?
I heard that you have to include stdio.h before calling printf. Why?