write a program to display the array elements in reverse
order in c language
Answer Posted / dally
#include<stdio.h>
int main()
{
int a[]={1,2,3,7,8};
int count=0,i;
while(a[i] != '\0')
{
count++;
}
for(i=count;i>=1;i--)
{
printf("%d",a[i]);
}
}
| Is This Answer Correct ? | 52 Yes | 48 No |
Post New Answer View All Answers
What is pass by reference in functions?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Difference between exit() and _exit() function?
How can I manipulate strings of multibyte characters?
Do pointers need to be initialized?
What Is The Difference Between Null And Void Pointer?
What is the advantage of c?
Why clrscr is used in c?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What is null pointer constant?
What is union and structure?
Why are algorithms important in c program?
Write a program to swap two numbers without using third variable?
Difference between macros and inline functions? Can a function be forced as inline?
What is main () in c?