随笔分类 -  C

摘要:如果n值为3,那么执行语句”m=-n++”后,m和n的值各为多少? m=-n++; 相当于 m=-(n++); 而不是 m=(-n)++; 因为运算符++的运算对象只能是变量,不能是表达式,对一个表达式使用增1或减1运算是一个语法错误,因此”m=(-n)++;”本身也是不合法的. 由于在表达式”-( 阅读全文
posted @ 2017-03-29 14:33 Veneus 阅读(558) 评论(0) 推荐(0)
摘要:#include int main() { char c = ‘a’; int a = 321, b, i; unsigned m = 65535, n; float x = 2.5, y; double d = 12345678.987; printf(“c=%c, a=%d, m=%u, x=%f, d=%f\n”, c, a,... 阅读全文
posted @ 2017-03-29 14:32 Veneus 阅读(282) 评论(0) 推荐(0)
摘要:第一次安装和使用Visual Studio 2017,写自己的第一个C语言程序。 出现error C4996. error C4996: ‘scanf’: This function or variable may be unsafe. Consider using scanf_s instead. 阅读全文
posted @ 2017-03-29 14:26 Veneus 阅读(850) 评论(0) 推荐(0)