理解
小白o菜
Stay hungry, stay foolish!
展开
-
指针常量和常量指针
#include<stdio.h> int main() { int a=10; int *b = &a;//指针 const int *c=&a;//常量指针,是指向常量的指针,const 和 int位置可变 int *const d = &a;//指针常量,该指针是个常量,不能改变 const int *const e = &a;//指针常量指向一...原创 2019-05-13 15:24:54 · 81 阅读 · 0 评论 -
浮点数以整形输出会影响后面程序的运行
浮点型指针变量应该用浮点型来定义,整数和浮点数运算结果会是浮点数,但存在整形变量里有会牵着转换成整形,vc里当浮点数以整形输出会是0,并影响后面的结果,但分成两行写就行了,就像&&运算当地一个不成立就直接跳过了,而dev可以正常运行应为这两个编译器的环境不一样,而且先后定义两个数,后定义的那个数的地址会小些,且一般小后定义那个数的字节数,但vc不是这样,他小了8,而dev小了4,刚...原创 2019-05-13 15:30:22 · 1136 阅读 · 0 评论 -
C语言文件的各种函数,看了这个就学会了C语言文件的基本函数
代码较长请耐心看并理解 #include <stdio.h> #include <stdlib.h> #include <string.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int ma...原创 2019-06-21 15:54:44 · 337 阅读 · 0 评论