write a program to display the array elements in reverse
order in c language

Answer Posted / vishnu948923

void main()
{
int a[10],i,n;
printf("enter howmany elements");
scanf("%d",&n);

for(i=0;i<=n;i++)
scanf("%d",&a[i]);

for(i=n;i>=0;i--)
printf("%d",a[i]);

}

Is This Answer Correct ?    258 Yes 125 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the benefit of using an enum rather than a #define constant?

662


Why is c so popular?

651


What do the functions atoi(), itoa() and gcvt() do?

726


What are the basic data types associated with c?

819


How #define works?

621






What language is c written?

578


What is const volatile variable in c?

580


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1447


Explain why c is faster than c++?

576


diff between exptected result and requirement?

1596


What is c variable?

555


Differentiate call by value and call by reference?

570


Do you know what are the properties of union in c?

587


How to throw some light on the b tree?

606


What is #include called?

571