// INTmemset.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <string.h>
int main(int argc, char* argv[])
{
int a[10];
memset(a,-1,sizeof(a));
for(int i=0;i<10;i++)
printf("%3d ",a[i]);
printf("\n");
memset(a,0,sizeof(a));
for( i=0;i<10;i++)
printf("%3d ",a[i]);
printf("\n");
return 0;
}
/*
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
0 0 0 0 0 0 0 0 0 0
Press any key to continue
*/
memset(a,-1,sizeof(a));
最新推荐文章于 2023-01-28 12:55:51 发布