设为首页 加入收藏

TOP

2.2 Literal Constants (7)
2013-10-07 15:25:11 来源: 作者: 【 】 浏览:68
Tags:2.2 Literal Constants

EXERCISES SECTION 2.2

Exercise 2.7: Explain the difference between the following sets of literal constants:

(a) ’a’, L’a’, "a", L"a"

(b) 10, 10u, 10L, 10uL, 012, 0xC

(c) 3.14, 3.14f, 3.14L

Exercise 2.8: Determine the type of each of these literal constants:

(a) -10 (b) -10u (c) -10. (d) -10e-2

Exercise 2.9: Which, if any, of the following are illegal

(a) "Who goes with F\145rgus \012"

(b) 3.14e1L (c) "two" L"some"

(d) 1024f (e) 3.14UL

(f) "multiple line comment"

Exercise 2.10: Using escape sequences, write a program to print 2M followed by a newline. Modify the program to print 2, then a tab, then an M, followed by a newline.

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇2.4 const Qualifier (1) 下一篇2.2 Literal Constants (6)

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Shell 传递参数 (2025-12-25 00:50:45)
·Linux echo 命令 - (2025-12-25 00:50:43)
·Linux常用命令60条( (2025-12-25 00:50:40)
·nginx 监听一个端口 (2025-12-25 00:19:30)
·整个互联网就没有一 (2025-12-25 00:19:27)