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

Answers were Sorted based on User's Feedback



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

Answer / bhikshuk patel

Actually i haven't any idea on array in reverse order. If
anyone will give dis answer, i'll be grateful to him/her.
And plz, tell me in brief.
thnk u..

Is This Answer Correct ?    1 Yes 4 No

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

Answer / mak

What if the iputted value of n is greater than the size of
array defined at the beginings????????

Is This Answer Correct ?    9 Yes 19 No

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

Answer / nanda

all the answers r wrong no logic

Is This Answer Correct ?    10 Yes 21 No

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

Answer / jitender

all are wrong....

Is This Answer Correct ?    10 Yes 21 No

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

Answer / dally

in the above of my answer is correct coz in that i am taking
count =0;
so the array will start from last element.

Is This Answer Correct ?    9 Yes 22 No

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

Answer / arpit dhandhania

Answer #2: You have assigned the elements of the array in
the program itself which by default starts from array index
0 that is the numbers goes into the array indices 0 1 2 3
4 and you have not initialzed or modified the value of i in
the first loop which happens to be a garbage or 0 so the
count goes to infinite. coz a[i] is never '\0'
Secondly in a numeric array last element in not null
character it is only in case of character arrays.
Assuming that you have implemented the 1st loop correctly
and you have the length of array a in count ie = 4 since u
are starting from 0 then you have initialized i to count
which makes i = 4.In the second loop the condition is i>=1
so i=0 is never visited and thus a[0] ir not displayed
(remember in C array starts from 0 by default).

Is This Answer Correct ?    5 Yes 20 No

Post New Answer

More C Interview Questions

Explain how do you list files in a directory?

0 Answers  


in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

4 Answers   Infosys, NetApp,


write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR

5 Answers  


Explain what is dynamic data structure?

0 Answers  


find second largest element in array w/o using sorting techniques? use onle one for loop.

15 Answers   BitWise, Zycus Infotech,


What is c mainly used for?

0 Answers  


to find the closest pair

0 Answers   Infosys,


Explain the difference between malloc() and calloc() in c?

0 Answers  


How to reverse a string using a recursive function, without swapping or using an extra memory?

31 Answers   Cisco, Mind Tree, Motorola, Ophio, Sony, TCS, Wipro,


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

0 Answers  


which of 'arrays' or 'pointers' are faster?

5 Answers  


How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST

6 Answers   Adobe, Huawei,


Categories