c语言笔试题
BOWWOB
社畜
展开
-
c语言不常用关键字
32个关键字 c语言不常用关键字: volatile extern register union enum 数据类型 字节数 char 1 short 2 int 4 long 8 float 8 double 16原创 2021-01-29 11:33:02 · 212 阅读 · 0 评论 -
c语言指针函数+文件操作
#include<iostream> #include<cstdio> #include<cstdlib> using namespace std; FILE *f; int main(){ //r+是可读写(文件必须存在) //w+可以读写 (不存在时创建) //r是只能读 w是只能写 如果做了其他操作不会报错 但是不成功 //f=fopen("文件名.txt","方式")打开 fclose(f)关闭 f=fopen("1.txt","r+")原创 2021-01-28 16:59:38 · 186 阅读 · 0 评论 -
c语言冒泡+单链表
冒泡排序: #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; const int size=5; int a[size]={5,1,3,2,4}; void buble_sort(){ for(int i=1;i<size;i++){ int flag=1; for(int j=0;j<=size-i-1;j++){ if(a[j]>原创 2021-01-28 16:07:25 · 94 阅读 · 0 评论 -
c语言指针定义笔试题
#include <iostream> #include <cstdio> //宏定义 常量 #define NUM 734503844 using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ //定义常变量 不能修改 const int num=734503844; /* 定义原创 2021-01-28 15:23:32 · 141 阅读 · 0 评论