摘要: 1.1 #include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; // 方式1:通过数组名和下标遍历输出数组元素 for(i=0; i<N; ++i) printf("%d", x[i]); 阅读全文
posted @ 2022-06-13 22:28 刘登艳 阅读(36) 评论(0) 推荐(0)
摘要: task1-1#include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 }Book; int main() { Book x[N] = { {"一九八四 阅读全文
posted @ 2022-06-06 22:52 刘登艳 阅读(11) 评论(1) 推荐(0)
摘要: task1.1 ① int型数组a数组a在内存中是连续存放的,每个元素占用4个内存字节单 ② char型数组b数组b在内存中是连续存放的,每个元素占用1个内存字节单元。 ③对应的值一样。 #include <stdio.h> #define N 4 int main() { int a[N] = { 阅读全文
posted @ 2022-05-09 17:20 刘登艳 阅读(32) 评论(1) 推荐(0)
摘要: 1.#include<stdio.h> #include<stdlib.h> #include<time.h> #include<unistd.h> #define N 80 void printText(int line,int col, char text[]); void printSpace 阅读全文
posted @ 2022-04-23 23:08 刘登艳 阅读(34) 评论(3) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 int main() { int grade,number; int i; srand (time(0)); for (i=0;i<N;++i) { grade=ran 阅读全文
posted @ 2022-04-18 15:57 刘登艳 阅读(27) 评论(1) 推荐(0)
摘要: #include<stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" \n"); printf(" o \n"); printf("<H>\n"); printf("I I\n"); re 阅读全文
posted @ 2022-03-28 23:22 刘登艳 阅读(28) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int answer; char words[5000]; printf("网课学习让一些人欢喜一些人忧.\n"); printf("1.作为喜欢自学且自律的人,觉得这样很好.有网络,自主学习,很ok.\n"); printf("2.不 阅读全文
posted @ 2022-03-28 23:16 刘登艳 阅读(32) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { char ans1, ans2; printf("第三章认真学完了一遍没?(输入y或Y表示认真学完一遍了,输入n或N表示没有):"); ans1=getchar(); getchar(); printf("\n动手敲代码了没? (输入y或 阅读全文
posted @ 2022-03-28 22:40 刘登艳 阅读(18) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int age1, age2; char gender1,gender2; scanf("%d%c%d%c",&age1,&gender1,&age2,&gender2); printf("age1=%d,gender1=%c\n",ag 阅读全文
posted @ 2022-03-28 22:04 刘登艳 阅读(20) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { double x, y; char c1, c2, c3; int a1,a2,a3; scanf("%d%d%d",&a1,&a2,&a3); printf("%d,%d,%d\n",a1,a2,a3); getchar(); scan 阅读全文
posted @ 2022-03-28 21:56 刘登艳 阅读(27) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示