A program to demonstrate the concept of DMA

Write a Program To demonstrate the concept of DMA.

int n, *p, i;
printf(“enter no. of elements:”);
scanf(“%d”, &n);
p= (int*) malloc (n* sizeof(int));
for(i=0; i<n; i++)
printf(“enter the number:”);
scanf(“%d”, (p+i));
for(i=0; i<n; i++)
printf(“%d\t”, *(p+i));


Program to demonstrate the concept of DMA in C Program

enter no. of Elements: 2

enter the number:3

enter the number:4

3              4

Leave a Reply

Your email address will not be published. Required fields are marked *