[ create a new paste ] login | about

Link: http://codepad.org/e1n7SNn5    [ raw code | output | fork ]

C, pasted on Nov 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#define n 5 
int main ()
{ int i=0;
int arr1[n]={1,2,3,4,5};  
int arr2[n];
 
while (i<n)
arr2[i]=arr1[i++];
 
i=0;
while (i<n)
printf ("%5d", arr2[i++]);
 
return 0;
}


Output:
1
    1    2    3    4    5


Create a new paste based on this one


Comments: