#include<stdio.h> hi()
{
printf("hello world!\n");
} int main()
{
hi(); int i = hi();
printf("%d\n", i);
/* 没有void的时候默认返回值为int, 结果i = 13 ???!!!??!?!?! */
}
code 2:
#include<stdio.h> int result(int x)
{
result = x * x; // c语言不支持这种写法哦~,改为return(x * x);
}
int main()
{
int x = ; printf("%d\n", result(x));
}