Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is pass by reference in functions?

850


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

1023


Difference between exit() and _exit() function?

1143


How can I manipulate strings of multibyte characters?

1115


Do pointers need to be initialized?

1089


What Is The Difference Between Null And Void Pointer?

1262


What is the advantage of c?

1132


Why clrscr is used in c?

1018


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

1246


What is null pointer constant?

1173


What is union and structure?

1127


Why are algorithms important in c program?

1126


Write a program to swap two numbers without using third variable?

1311


Difference between macros and inline functions? Can a function be forced as inline?

1278


What is main () in c?

1078