1 2 3 4

2020年12月10日

C语言之strcat函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> int main(){ char str1[] = "安徽粮食"; char str2[] = "工程职业学院"; strcat(str1, str2); // hello world 阅读全文

posted @ 2020-12-10 22:47 三日坊主i 阅读(237) 评论(0) 推荐(0)

C语言之strcpy函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> int main(){ char arr1[] = "安徽粮食工程学院"; char arr2[100]; strcpy(arr2, arr1); printf("拷贝后的字符串是:%s 阅读全文

posted @ 2020-12-10 22:43 三日坊主i 阅读(94) 评论(0) 推荐(0)

C语言之strlen字符串函数

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> int main(){ char add[20]; //输入 printf("请输入字符串的内容: \n"); gets(add); int x=strlen(add); printf( 阅读全文

posted @ 2020-12-10 22:24 三日坊主i 阅读(120) 评论(0) 推荐(0)

C语言之字符串标准输入输出

摘要: #include <stdio.h>#include <stdlib.h>#include <string.h> int main(){ char add[20]; //输入 printf("请输入字符串的内容: \n"); gets(add); //输出 printf("您输入的字符串的内容是: 阅读全文

posted @ 2020-12-10 22:11 三日坊主i 阅读(119) 评论(0) 推荐(0)

C语言之多维数组

摘要: #include <stdio.h>#include <stdlib.h> int main(){ int add[2][3][4] = { {{1,2,3,4},{5,6,7,8},{9,10,11,12}}, {{13,14,15,16},{17,18,19,20},{21,22,23,24}} 阅读全文

posted @ 2020-12-10 22:08 三日坊主i 阅读(134) 评论(0) 推荐(0)

C语言之二维数组

摘要: #include <stdio.h>#include <stdlib.h> int main(){ int add[3][3] = { {1,2,3},{4,5,6},{7,8,9} }; for (int x = 0; x < 3; x++) { for (int i = 0; i < 3; i+ 阅读全文

posted @ 2020-12-10 22:04 三日坊主i 阅读(153) 评论(0) 推荐(0)

导航