• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

wchenfeng

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 32 下一页

2022年4月12日

文件,本程序用于创造一个文件,或者搜索一个文件,然后输入字符串到其中,并进行读取

摘要: #include#include#include#define nu NULLint main(){ FILE *fp;char string[128]; char ch;char a[128],b[128]; printf("本程序用于创造一个文件,或者搜索... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(36) 评论(0) 推荐(0)

文件,在操作台上进行自主文件拷贝,并进行自主命名。

摘要: #include#includeint main(){ FILE *infp,*outfp; char ch;char a[128],b[128]; printf("请输入本文件目录中存在的文件名加后缀:"); gets(a);//infile.txt pri... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(37) 评论(0) 推荐(0)

文件,计算本目录当中一个txt文件其中的字符个数

摘要: #include"stdio.h"#include"stdlib.h"#define nu NULLint main(){ char a[128]; FILE *fp;int count=0; printf("本程序计算txt文本的字符个数\n"); prin... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(57) 评论(0) 推荐(0)

c语言文件初步入门文本拷贝

摘要: 可判断文件是否打开 创建文件inflie.c #include#includeint main(){ FILE *infp,*outfp; char ch; if((infp=fopen("infile.c","r"))==NULL) { printf("c... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(49) 评论(0) 推荐(0)

编写一个链表结构,读取任意多个用户输入。之后遍历链表,再将链表数据打印出来。

摘要: #define _CRT_SECURE_NO_WARNINGS#include #include //malloc free等函数会使用到这头文件//定义链表的节点typedef struct node_s { long num; //学号 fl... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(62) 评论(0) 推荐(0)

编写一个链表结构,读取任意多个用户输入。之后将“2017000 85.0”和“2017006 85.0”“2017013 85.0”这三个数据插入链表,再将链表数据打印

摘要: #define _CRT_SECURE_NO_WARNINGS#include #include //malloc free等函数会使用到这头文件//定义链表的节点typedef struct node_s { long num; //学号 ... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(37) 评论(0) 推荐(0)

根据P257页例题3-18要求,编写一个链表结构,读取任意多个用户输入。之后将“2017001 81.0”和“2017005 85.0”“2017010 90.0”这三个数据从链表中删除,再将链表数据

摘要: #define _CRT_SECURE_NO_WARNINGS#include #include //malloc free等函数会使用到这头文件//定义链表的节点typedef struct node_s { long num; //学号 ... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(33) 评论(0) 推荐(0)

根据年月日,判断已经多少天(4)

摘要: #includeint main(void){ int year,month,days=0,day,flag,sum=0; printf("Please input year:"); scanf("%d",&year); ... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(24) 评论(0) 推荐(0)

(2)读取用户输入的任意多个整数,保存到malloc申请的内存空间中,打印数组,打印结束后要使用free释放内存。

摘要: #define _CRT_SECURE_NO_WARNINGS#include#include#includeint main()//主函数要写{ int i,n;//变量i,n要先定义才能使用。 int *p; scanf("%d",&n); p=(int*... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(45) 评论(0) 推荐(0)

读取用户输入的任意多个整数,保存到malloc申请的内存空间中,打印数组,打印结束后要使用free释放内存。

摘要: #include#includeint main(){ int n,i;int *p; p=(int *)malloc(9*4); scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&p[i]); for(i=0;i<n;... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(38) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 32 下一页
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3