We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64b5f17 commit d372ee8Copy full SHA for d372ee8
Hackerrank solutions/30 days Of Code/Day7-Arrays.c
@@ -0,0 +1,34 @@
1
+/* Sample Input
2
+
3
+4
4
+1 4 3 2
5
+Sample Output
6
7
+2 3 4 1
8
9
+Print the elements of array A in reverse order as a single line of space-separated numbers. */
10
11
+#include <assert.h>
12
+#include <limits.h>
13
+#include <math.h>
14
+#include <stdbool.h>
15
+#include <stddef.h>
16
+#include <stdint.h>
17
+#include <stdio.h>
18
+#include <stdlib.h>
19
+#include <string.h>
20
21
+int main()
22
+{
23
24
+ int n; int temp;
25
+ scanf("%d",&n);
26
+ int a[n];
27
+ for(int i=0;i<n;i++)
28
+ {
29
+ scanf("%d",&a[i]);}
30
31
+ for(int i=n-1; i>=0;i--)
32
+ printf("%d ",a[i]);
33
+ return 0;
34
+}
0 commit comments