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
Can you mix old-style and new-style function syntax?
What is meant by inheritance?
What is c value paradox explain?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Lists the benefits of c programming language?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What are keywords c?
Which is the memory area not included in C program? give the reason
What is scope rule of function in c?
Explain what is the general form of a c program?
How can I find out the size of a file, prior to reading it in?
What is the ANSI C Standard?
Explain how can I convert a string to a number?
swap 2 numbers without using third variable?
Why static is used in c?