C语言课后习题&头歌答案

本文全部公式采用mathjax渲染,观感极佳
第一章:
problems 1.7:
problems 1.8:
problems 1.9:
problems 1.12:
第二章:
problems 2.3:
1  | 4th 不是 , 以数字开头  | 
problems 2.4:
1  | 2L 合法,long长整型  | 
problems 2.6:
1  | (1)int a; b = 5; 第一个分号改为逗号int a, b=5;  | 
problems 2.7:
1  | (1)++a*b-- -> 4  | 
problems 2.8:
1  | (1)a==b==c 错误,c未定义且逻辑错误  | 
problems 2.10:
1  | (1)~x&x -> 0  | 
problems 2.11:
1  | ( k >> 8 ) | ( p << 8 )  | 
problems 2.16:
1  | ( a > b ) ? ( a > c ? a : c ) : ( c > b ? c : b )  | 
problems 2.18:
1  | ( ( a % 3 == 0 ) && (a % 10 == 5) ) ? 1 : 0  | 
第三章:
problems 3.5:
1  | 
  | 
problems 3.7:
1  | 
  | 
第四章:
problems 4.1:
1  | 
  | 
problems 4.3:
1  | 
  | 
problems 4.5:
1  | 
  | 
problems 4.9:
1  | 
  | 
problems 4.10:
1  | 
  | 
problems 4.11:
1  | 
  | 
problems 4.17:
1  | 
  | 
第五章:
problems 5.1:
1  | 
  | 
problems 5.6:
1  | 不能,swap传入的是形参,只能在swap函数中使用,无法传回原函数。  | 
problems 5.7:
1  | (1) p(6) = 6 ; (2) p(6) = 12 ;  | 
problems 5.8:
1  | int i ;  | 
1  | Answer:  | 
problems 5.11:
1  | 
  | 
problems 5.13:
1  | 
  | 
problems 12.1:
1  | 
  | 
problems 12.3:
1  | 
  | 
第六章
problems 6.1:
1  | (2) 编译时将 NUMBER 换成 = 20 ;  | 
problems 6.4:
1  | 
  | 
第七章:
problems 7.7:
1  | 
  | 
problems 7.8:
1  | 
  | 
problems 7.9:
1  | 
  | 
problems 7.13:
1  | 
  | 
problems 7.15:
1  | 
  | 
problems 12.5:
1  | 
  | 
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 dekrt's blog!
 评论










