Chinaunix首页 | 论坛 | 博客
  • 博客访问: 68701
  • 博文数量: 22
  • 博客积分: 300
  • 博客等级: 二等列兵
  • 技术积分: 167
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-03 22:28
文章分类

全部博文(22)

文章存档

2011年(22)

我的朋友

分类: C/C++

2011-08-10 10:46:30

原来一直搞不清楚 C 中static ,extern 在各个地方的含义 今天发现在expert c programming 中的总结算是搞明白了


Symbol

Meaning

static

Inside a function, retains its value between calls.

At the function level, visible only this file.

extern

Applied to a function definition, has global scope ( and is redundant).

Applied to a variable, defined elsewhere.

Void

As the return type of function, doesn’t return a value.

In a pointer declaration, the type of a generic pointer.

In a parameter list, takes no parameters.

*

The multiplication operator.

Applied to a pointer, indirection.

In a declaration, a pointer.

&

Bitwise AND operator.
Address-of operator.

=

==

Assignment operator.

Comparison operator.

<=

<<=

Less-than-or-equal-to operator.

Compound shift-left assignment operator.

 

Less-than operator.

Left delimiter in #include directive.

()

Enclose formal parameters in a function definition.

Make a function call.

Convert (cast) a value to a different type.

Define a macro with arguments.

Enclose the operand of the sizeof operator when it is a typename

 

阅读(1457) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~