Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i,n,a[50],b[50];
- scanf("%d",&n);
- for(i=0;i<n;i++)
- {
- scanf("%d",&a[i]);
- }
- for(i=0;i<n;i++)
- {
- b[i]=a[i];
- }
- printf("\nThe elements of the first array:");
- for(i=0; i<n; i++)
- {
- printf(" %d", a[i]);
- }
- printf("\nThe elements that got copied to the second array:");
- for(i=0; i<n; i++)
- {
- printf(" %d", b[i]);
- }
- printf("\n\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement