From the course: C Programming Basics: Flow Control, Variables, and Pointers
Unlock the full course today
Join today to access over 23,100 courses taught by industry experts.
Sending text to output - C Tutorial
From the course: C Programming Basics: Flow Control, Variables, and Pointers
Sending text to output
- [Instructor] A program has to do something. That something involves taking input and generating output. Input and output form the famous computer duo I and O, and it's what programming is all about. This is how a typical C program works. It's a machine that accepts input, does something to it, then generates output. If the program doesn't do anything, then it's basically plumbing. What goes in, comes out. The C library offers a host of output functions. Of the lot, three are the most popular. They are pronounced printf, putchar, and puts. Each function sends one or more characters to the standard output device, which is the screen or terminal. Each is declared in the standard I/O header file and these functions are part of the standard C programming library. The traditional first C program is called hello world. It outputs the text hello world. In fact, it's the default skeleton that Code::Blocks produces when you…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Introducing C code3m 43s
-
(Locked)
Sending text to output2m 55s
-
(Locked)
Challenge: Add a puts() statement30s
-
(Locked)
Solution: Add a puts() statement1m 19s
-
Adding comments to the code2m 50s
-
(Locked)
Exploring the printf() function1m 57s
-
(Locked)
Challenge: Add a new line53s
-
(Locked)
Solution: Add a new line1m 32s
-
(Locked)
Working with escape sequences1m 46s
-
(Locked)
Challenge: Use escape sequences43s
-
(Locked)
Solution: Use escape sequences1m 36s
-
(Locked)
Working with values and placeholders4m 39s
-
(Locked)
Introducing variables3m 4s
-
(Locked)
Experimenting with variables3m 11s
-
(Locked)
Using character I/O6m 3s
-
(Locked)
Exploring the scanf() function4m 20s
-
(Locked)
Working with strings5m 25s
-
(Locked)
Understanding arithmetic in C1m 51s
-
(Locked)
Doing math5m 53s
-
(Locked)
Making more calculations2m 37s
-
(Locked)
Challenge: Math quiz46s
-
(Locked)
Solution: Math quiz2m 26s
-
-
-
-
-