首页 > 系统服务 > 详细

一些关于linux的一些简单的应用

时间:2015-07-31 06:46:24      阅读:224      评论:0      收藏:0      [点我收藏+]
#include <stdio.h>
#include <stdlib.h>
int main()
{
	printf("file:%s\nline:%d\ndate:%s\ntime:%s\n", __FILE__, __LINE__, __DATE__, __TIME__);     system("pause");
	return 0;
}
#include <stdio.h>
#include <stdlib.h>
#define CAT(X,Y) X##Y
int main()
{
	printf("%d\n", CAT(3, 4));
//	system("pause");
//	return 0;
//}
//#include <stdio.h>
//#include <stdlib.h>
//#define PRINT(FOMAL,VALUE) printf("the value of "#VALUE" is "FOMAL"",VALUE)
//int main()
//{
//	int a = 10;
//	PRINT("%d", a);
//	system("pause");
//	return 0;
//}
//#include <stdio.h>
//#include <stdlib.h>
//#define MAX(X,Y) (X)>(Y)?(X):(Y)
//int main()
//{
//	int a = 10;
//	int b = 20;
//	int ret = MAX(a, b);
//	printf("MAX=%d\n", ret);
//	system("pause");
//	return 0;
//}
#include <stdio.h>
#include <stdlib.h>
#define MALLOC(NUM,TYPE)  ((TYPE*)malloc(NUM*sizeof(TYPE))
int main()
{
	int *p = (int *)malloc(10 * sizeof(int));
	free(p);
	p = NULL;
	system("pause");
	return 0;
}


一些关于linux的一些简单的应用

原文:http://10541695.blog.51cto.com/10531695/1680259

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!