/* SAGpa Sa bala Kan-a */
#include
#include
int main ()
{
int i,n;
int * pData;
printf ("Amount of numbers to be entered: ");
scanf ("%d",&i);
pData = (int*) calloc (i,sizeof(int));
if (pData==NULL) exit (1);
for (n=0;n
{
printf ("Enter number #%d: ",n);
scanf ("%d",&pData[n]);
}
printf ("You have entered: ");
for (n=0;n
free (pData);
return 0;
}
Calloc in C
Posted by acas arnel m. at 12:48 AM
Labels: C language codes
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment