课程: Complete Guide to C Programming Foundations
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Exploring the printf() function - C教程
课程: Complete Guide to C Programming Foundations
Exploring the printf() function
- [Instructor] The C language most likely spawned the printf function, which is used in many other programming languages. This function generates formatted output. Its first or only argument is a formatting string as shown in this exercise file. This text is output. Unlike the puts function, a new line isn't added to this text automatically. The new line escape character here does the job. And there's the text. The power in the printf function lies in the placeholders or conversion specifications found in the formatting string. Here you see the percent D placeholder, corresponding to it is an additional argument, integer variable A. These data types must match, percent D for decimal integer, and integer variable A. Here is the formatted output. This code's printf statement has three placeholders in its formatting string, percent C for character variable CH, percent U for unsigned integer variable X and percent F for floating point value pi. Most editors color code the placeholders…
内容
-
-
-
-
Understanding C language data types3 分钟 17 秒
-
(已锁定)
Declaring variables2 分钟 53 秒
-
(已锁定)
Working with variables3 分钟 4 秒
-
(已锁定)
Exploring the printf() function3 分钟 48 秒
-
(已锁定)
Using constants2 分钟 58 秒
-
Challenge: Making variables and constants53 秒
-
(已锁定)
Solution: Making variables and constants1 分钟 16 秒
-
(已锁定)
Understanding variable scope3 分钟 35 秒
-
(已锁定)
Making new data types3 分钟 25 秒
-
(已锁定)
Specifying characters and strings3 分钟 17 秒
-
(已锁定)
Specifying integers and real numbers3 分钟 55 秒
-
(已锁定)
Typecasting a variable2 分钟 20 秒
-
(已锁定)
Chapter challenge: Adding variables and constants1 分钟 10 秒
-
(已锁定)
Chapter solution: Adding variables and constants2 分钟 7 秒
-
-
-
-
-
-
-
-
-
-