Write a program to demonstrate the use of malloc.

#include<conio.h>
#include<stdio.h>
CPU-2110003 CPU Program
V.V.P Engineering College Developed By: Tejas Rupani
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int *)calloc(sizeof(int)*10);
printf("enter the value");
scanf("%d",ptr);
printf("\nthe entered value is %d",*ptr);
}

No comments:

Post a Comment