Académique Documents
Professionnel Documents
Culture Documents
#include <stdio.h>
#include <alloc.h>
#include <stdlib.h>
void main()
{
int i,n;
int *a,*b,*c;
a = (int *) malloc(n*sizeof(int));
b = (int *) malloc(n*sizeof(int));
c =( int *) malloc(n*sizeof(int));
for(i=0;i<n;i++)
{
*(c+i) = *(a+i) + *(b+i);
}
} /* End of main() */
/*---------------------------------------
Output
How many Elements in each array...
4
Enter Elements of First List
1
2
3
4
Enter Elements of Second List
6
7
8
9
Resultant List is
7
9
11
13
----------------------------------------*/