输入输出函数家族
家族名
用途
可用于所有的流
只用于stdin 和stdout
getchar
字符输入
fgetc ,getc
getchar
putchar
字符输出
fputc ,putc
putchar
gets
文本行输入
fgets
gets
...
Heller
6年前 (2016-02-03) 1639℃ 0评论
0喜欢
一、static和extern
大工程下我们会碰到很多源文件。
文件a. c
static int i; //只在a文件中用
int j; //在工程里用
static void init( ) //只在a文件中用
{
}
void callme( ) //在工程中用
{
sta...
Heller
6年前 (2016-02-03) 1677℃ 0评论
0喜欢
1.求下面函数的返回值(微软)
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
}
return countx;
}
假定x = 9999。 答案:8
思路:将x转化为2进制,看含有的1...
Heller
6年前 (2016-02-03) 1737℃ 0评论
0喜欢
一、 #include “filename.h” 和 #include <filename.h> 的区别
#include “filename.h” 是指编译器将从当前工作目录上开始查找此文件
#include <...
Heller
6年前 (2016-02-03) 9852℃ 0评论
0喜欢
Sizeof 用法
本文主要包括二个部分,第一部分重点介绍在VC 中,怎么样采用sizeof 来求结构的大小,以及容易出现的问题,并给出解决问题的方法,第二部分总结出VC 中sizeof 的主要用法。
1 、 sizeof 应用在结构上的情况
请看下面的结构:
struct My...
Heller
6年前 (2016-02-03) 1689℃ 0评论
0喜欢
一、可能的组合:
(1)const char*p
(2)char const*p
(3)char *const p
(4)const char **p
(5)char const**p
(6)char *const *p...
Heller
6年前 (2016-02-03) 1871℃ 0评论
0喜欢