随笔分类 - C语言
摘要:C语言文件 文件创建与关闭: 创建指针文件FILE*myfile 调用fopen(”文件名称“,”打开方式“)打开文件 调用fclose(文件指针变量) 关闭文件 #include<stdio.h> int main(){ FILE*myfile; myfile=fopen("文件名称",'w');
阅读全文
摘要:C语言结构体--Structures(1) Basic introduction without pointer 什么是结构体? 结构体是C语言中一种复合数据类型,它允许我们将不同类型的数据组合在一起,形成一个新的数据类型。 比如说最常见的int,char等类型,我们定义一个变量时候常用int a,
阅读全文
摘要:C language-- TheScope, Visibility and Lifetime of Variables 全局变量 普通全局变量 //file1 #include<stdio.h> int a =3; int main(){ //code block } 作用范围是整个程序,它们的生命
阅读全文

浙公网安备 33010602011771号