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
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
Explain how do you determine the length of a string value that was stored in a variable?
What is the 'named constructor idiom'?
Which driver is a pure java driver
which is an algorithm for sorting in a growing Lexicographic order
Why & is used in c?
What are loops in c?
what is bit rate & baud rate? plz give wave forms
What is difference between stdio h and conio h?
Tell me when is a void pointer used?
What is the difference between printf and scanf in c?
What is an auto variable in c?
What are the features of c language?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
What does main () mean in c?