初识c语言

笔记代码

//#include <stdio.h>
//
//enum sex
//{
//	MALE,
//	FEMALE,
//	SECRET
//};
//int main()
//{
//	enum sex s = MALE;
//	return 0;
//}

//#define _CRT_SECURE_NO_WARNINGS
//#include <stdio.h>
//int main()
//{
//	char arr1[] = "abc";
//	char arr2[] = { 'a', 'b', 'c', '\0' };
//
//	printf("%d\n", strlen(arr1));
//	printf("%d\n", strlen(arr2));
//
//	return 0;
//}

//#include <stdio.h>
//int main()
//{
//	printf("c:\\test\\32\\.c");
//	return 0;
//
//}

//#include <stdio.h>
//int main()
//{
//printf("%s\n","\'");
//return 0;
//}
//#include <stdio.h>
//#include <string.h>
//int main()
//{
//	printf("%d\n", strlen("c:\tset\32\test.c"));
//	return 0;
//}
//
//
#include <stdio.h>
#define _CRT_SECURE_NO_WARNINGS
#include <string.h>








//struct someone
//{
//	char name[20];
//	int height;
//};
//int main()
//{
//	struct someone a = { "curry", 191 };
//	struct someone *pb = &a;	
//	
//	printf("%p\n", &a);
//	a.height = 200;
//	strcpy(a.name, "jordan");
//	printf("%s\n",pb->name);
//	printf("名字%s\n", a.name);
//	printf("身高%dcm\n", a.height);
//	return 0;
//}


//int main()
//{
//	int a = 1;
//	printf("%p\n", &a);
//	int*m = &a;
//	*m = 2;
//	printf("%d\n", a);
//	return 0;
//	
//}

//int mas(int a, int b)
//{
//	if (a > b)
//		return a;
//	else
//		return b;
//	
//}
//#define max()(a>b?a:b)//#define的定义可以变换一个函数
//int main()
//{
//	int a = 20;
//	int b = 5;
//	int c = 0;
//	int d = 0;
//	c = max(a, b);
//	printf("%d\n", c);
//	d = mas(a, b);
//	printf("%d\n", d);
//	return 0;
//}


//int ddd()
//{
//	static int c = 2;
//	c=c+2;
//	printf("%d\n", c);
//
//}
//int main()
//{
//	int i = 1;
//	while (i < 10)
//	{
//		ddd();
//		i++;
//	}
//	return 0;
//}


//int main()
//{
//	int a = 3;
//	int b = 4;
//	int x = (a > b ? a : b);
//	printf("%d\n", x);
//	return 0;
//}







//int max(int x, int y)
//{
//	if (x > y)
//	return x;
//	else
//	return y;
//}
//int main()
//{
//	int a = 0;
//	int b = 0;
//	int c = 0;
//	scanf_s("%d%d", &a, &b);
//	c = max(a, b);
//	printf("较大的数=%d\n", c);
//	return 0;
//}




//int main()
//{
//	int a = 0;
//	int b = 0;
//	scanf_s("%d%d", &a, &b);
//	if (a > b)
//		printf("%d\n", a);
//	else
//		printf("较大的数=%d\n", b);
//	return 0;




//
//




//int Add(int x, int y)
//{
//	int a = x + y;
//	return a;
//}
//int main()
//{
//	int b = 1;
//	int c = 1;
//	int z = 0;
//	int d = 0;
//	z = Add(b, c);
//	printf("%d\n", z);
//	int arr[10] = { 0 };
//	printf("%d\n", sizeof(arr));
//	d = sizeof(arr) / sizeof(arr[1]);
//	printf("%d\n", d);
//	return 0;
//}


//int main()
//{
//	
//	int arr[10] = { 1, 2, 3, 4, 5, 6, 7, 8 };
//	printf("d\n");
//	int i = 0;
//	while (i < 8)
//	{
//	
//		printf("%d\n", arr[1]);
//		i++;
//    }
//	return 0;
//
//}






//int main()
//{
//	int i = 0;
//	while (i < 100)
//	{
//		printf("我要每天学习%d\n", i);
//		i++;
//	}
//	printf("oh yeah\n");
//	return 0;
//}








//int main()
//{
//	int input = 0;
//	printf("internet\n");
//	printf("好好学习吗(0/1)>:");
//	scanf_s("%d", &input);
//	if (input == 1)
//	printf("年薪30w\n");
//	else
//	printf("卖红薯\n");
//	return 0;
//}
//
//

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cc__language

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值