C语言积累

一、C语言、C99、C11


目前最新的C语言标准是C11
C99中最常用的特性已经包含在C++中(例如64位整数,随处声明变量,单行注释)

二、scanf_s()中%lf与%f有区别


%lf-->double
%f-->float

三、尽量减小变量的作用域;

 

四、使用伪代码,关注主要步骤,忽略具体实现细节;

 

五、将64位整形输出可以使用%lld或者%I64d;

 

六、main函数的两个参数:


     main(int argc, char *argv[])
     argc -> int -> the length of the paraments
     argv -> char set -> string -> the paraments
                                 -> the first is the mane of programe containing the full path
     运行:**.exe str1 str2

1

七、命令行参数输入,结果输出运行:

      

       程序中有接收输入的函数
     echo str1 str2 | **.exe

八、在scanf_s()中空格、TAB、回车都是无关紧要的


     在收到正常输入时返回1,在收到Ctrl+Z时结束输入

posted @ 2018-03-03 22:28  追梦松鼠  阅读(133)  评论(0编辑  收藏  举报