先在Turbo C 2.0中编译:
#include <stdio.h>
fun()
{
return 1;
}
main()
{
printf("%d",fun(2));
getchar();
}
再在c++编译器上编译
查看结果
下面还有个是关于GNU的
void * pvoid;
pvoid++; //ANSI:错误
pvoid += 1; //ANSI:错误
//ANSI标准之所以这样认定,是因为它坚持:进行算法操作的指针必须是确定知道其指向数据类型大小的。
//例如:
int *pint;
pint++; //ANSI:正确
pint++的结果是使其增大sizeof(int)。
但是大名鼎鼎的GNU(GNU‘s Not Unix的缩写)则不这么认定,它指定void *的算法操作与char *一致。
因此下列语句在GNU编译器中皆正确:
pvoid++; //GNU:正确
pvoid += 1; //GNU:正确
pvoid++的执行结果是其增大了1。
在实际的程序设计中,为迎合ANSI标准,并提高程序的可移植性,我们可以这样编写实现同样功能的代码:
void * pvoid;
(char *)pvoid++; //ANSI:正确;GNU:正确
(char *)pvoid += 1; //ANSI:错误;GNU:正确
An employee named Fren comes to you asking for help with the power settings on her portable Windows 2000 Professional computer. She wants to maximize battery life by having all devices power off when she presses the sleep button. When she restores power, she wants to begin where she last left off (ie, she does not want to have to boot the computer). What power option or scheme do you recommend for her?
a. Standard options.
b. Power Off option.
c. Hibernate option.
d. Always On power scheme.
e. Portable power scheme