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
Difference between constant pointer and pointer to a constant.
What are different types of pointers?
What is getche() function?
Can math operations be performed on a void pointer?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
Why is event driven programming or procedural programming, better within specific scenario?
Is the exit() function same as the return statement? Explain.
How can I discover how many arguments a function was actually called with?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What is fflush() function?
What are the different types of control structures?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What are the advantages of the functions?
What is malloc return c?