write a program to display the array elements in reverse
order in c language
Answer Posted / tej
#include<stdio.h>
#include<conio.h>
void main()
{
int a[],n;
printf("enter array size");
scanf("%d",&n);
printf("enter elements of an array");
for(i=0;i<n;i++)
{
scanf("%d",a[i]);
}
for(i=1;i<=n;i++)
{
printf("%d",a[n-i]);
}
getch();
}
Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
When should you use a type cast?
What is a void * in c?
How can I write functions that take a variable number of arguments?
Describe the order of precedence with regards to operators in C.
Can math operations be performed on a void pointer?
Why is sprintf unsafe?
What is the difference between volatile and const volatile?
Write a code to generate divisors of an integer?
What does printf does?
Why do we use int main instead of void main in c?
How is null defined in c?
What is cohesion in c?
What are identifiers in c?
What is pass by reference in c?
When c language was developed?