摘要: 4. 实验任务4 task4.c源码: #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> int main() { FILE* fp; char ch; int cnt = 0; fp = fopen("data 阅读全文
posted @ 2023-12-17 14:07 PetroniusMo 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 4. 实验任务4 task4.c源码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_p 阅读全文
posted @ 2023-12-17 13:55 PetroniusMo 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 task1_1.c程序源码: #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pm 阅读全文
posted @ 2023-12-03 15:07 PetroniusMo 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 1. 实验任务1 #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出in 阅读全文
posted @ 2023-11-18 20:08 PetroniusMo 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 实验1 C语言输入输出和简单程序编写 一、实验目的 1. 会使用C语言程序开发环境(vs2010/devc++等),能熟练、正确使用它们编写、编译、运行、调 试C程序 2. 知道C程序结构和编码规范,能正确使用 3. 能正确、熟练使用C语言输入输出函数:scanf(), printf(), getc 阅读全文
posted @ 2023-10-07 14:13 PetroniusMo 阅读(50) 评论(0) 推荐(0) 编辑