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

Explain About fork()?

636


What are the different data types in C?

718


how can use subset in c program and give more example

1489


What is use of null pointer in c?

563


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

572






What is structure data type in c?

560


Write a program to print “hello world” without using semicolon?

665


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

707


What are integer variable, floating-point variable and character variable?

596


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

9647


What is a pointer on a pointer in c programming language?

611


Why we use break in c?

539


What Is The Difference Between Null And Void Pointer?

630


Why is main function so important?

605


How will you declare an array of three function pointers where each function receives two ints and returns a float?

770