answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

// note: this code does not test for user-input errors!!

int main() {

int array[10],i,n;

printf("enter the number of elements in the array:");

scanf("%d",&n);

for(i=0;i<n;i++) scanf("%d",&array[i]);

printf("the reverse ordered array is :");

for(i=n-1;i>=0;i--) printf("%d",array[i]);

return 0;

}

User Avatar

Wiki User

7y ago

What else can I help you with?

Related Questions

C program to read an array and print its reverse number using pointers?

#include&lt;stdio.h&gt; void main() { int *p,n,s=0; printf("Enter Number :"); scanf("%d",&amp;n); for(p=&amp;n;*p&gt;0;p++) { s=s*10+*p%10; *p=*p/10; } printf("Reverse Number=%d",s); }


Program to print all the even numbers of an array in visual basic?

find even number in array


Write a java program to print the result in the series?

If you have the series stored in an array, you loop through the array and print each array element in turn. Another possibility is to print out the numbers in the series as you generate them. In that case, you may not need to store anything (depending on the series, of course).


Print array in reverse order vb6?

Well maybe you can make another form show() but make its opacity 0 so people wont know the secret behind it, no the other form, make it display the array backwards and use the print dialog to print the hidden form.


Write a c program to find the maximum of two numbers and print out with its position?

maxValue = function (array) {mxm = array[0];for (i=0; i&lt;array.length; i++) {if (array[i]&gt;mxm) {mxm = array[i];}}return mxm;}; i don't know


Write a program to reverse the given string?

Use for loop declare string array str[] and string variable l= string length of string array j=l for i=0 to i=l/2 then temp=str[i] str[i]=str[j-1] str[j-1]=temp j=j-1 now print str array it will be reversed


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


Program to print sorting of an array in clanguage?

/* PROGRAM TO SORT ARRAY ELEMENTS USING BUBBLE SORT*/ #include #include void main() { int i,j,n,t,a[50]; clrscr(); printf("ENTER THE ARRAY SIZE:\n"); scanf("%d",&amp;n); printf("ENTER THE ARRAY ELEMENTS:\n"); for(i=0;i


Print reverse string in c sharp?

To print a reverse string in C#, you can use the Array.Reverse method or LINQ. Here's a simple example using Array.Reverse: string original = &quot;Hello, World!&quot;; char[] charArray = original.ToCharArray(); Array.Reverse(charArray); string reversed = new string(charArray); Console.WriteLine(reversed); This code converts the string to a character array, reverses the array, and then creates a new string from the reversed array before printing it.


How to print the reverse of an array without using backward loop?

int youArray[arraysize] = {...};...for (int i = 1; i


How do you write a program which reads a list of ten numbers and print the list in reserve order in c program?

The simplest way is probably to read the numbers into an array and then prints each element of the array starting at the last one and moving backwards.


How to write a program in python to print the reverse of a number?

In python, type the following into a document. NOTE: Sentences following a # symbol are comments, and are not necessary for the program to run. #!/usr/bin/python #This program takes a input from a user and reverses it. number = input("Type a number: ") #This takes input from a user. a = len(number) #This finds the length of the number reverse = "" #This sets the variable reverse to an empty string. for i in number: a = a-1 #The places in a string start from 0. The last value will be the length minus 1.reverse = reverse + number[a] #Makes the number's last digit the new string's first. print("The reverse of", number, "is", reverse + ".") #prints the resulting string. This program will take any sequence of characters and reverse them. The final value is a string, but if an integer is needed, one needs only to add the line reverse = int(reverse) above the print statement. However, this will stop the program from being able to reverse strings, as it is not possible to convert a string to an integer if it is not a number.