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
What is function prototype?
What is the auto keyword good for?
What is data type long in c?
What is int main () in c?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
What is malloc() function?
Which of these functions is safer to use : fgets(), gets()? Why?
Explain what are multidimensional arrays?
Can you subtract pointers from each other? Why would you?
Differentiate between new and malloc(), delete and free() ?
How does normalization of huge pointer works?
What is the use of a static variable in c?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
What is a substring in c?