#include<stdio.h>
#include<string.h>
int main()
{
int n = 10,i;
int an[n];
printf("Before memset() : ");
for(i=0;i<n;i++)
{
printf("%d ", an[i]);
}
printf("\n\n");
memset(an, 0, n*sizeof(an[0]));
printf("After memset() : ");
for(i=0;i<n;i++)
{
printf("%d ",an[i]);
}
printf("\n\n");
return 0;
}
Comments
Post a Comment