The C language specifies single-character literals as enclosed in single quotes, string literals are enclosed in double-quotes. Expressing character and string literals, and knowing how strings are terminated with the null character, is necessary to avoid writing easily exploitable code.
- [Instructor] To declare a single character … literal in your code, … sit the character between a pair of single quotes … as shown here. … For untypable values, like Enter or Tab, … use an escape sequence. … These characters, and yes, … they're interpreted as a single character, … start with a backslash and then some type of character code. … You can also escape specific values as a single character, … such as hexadecimal value 41, … which is shown as \X41. … Though multiple characters are used in these expressions, … the escape sequence remains a single character value. … This list shows common escape sequences … for single characters. … The new line is the one you see most often, … which inserts the Enter key press into a string, … or it can be used as a single character. … If you want to specify a single quote character, … you can use the backslash single quote within single quotes … and string literals with double quotes inside … must have the internal double quote character escaped …
- Writing your first C program
- Working the C development cycle
- Adding comments to code for clarity
- C language data types
- Declaring variables
- Making new data types
- Typecasting variables
- Using math, assignment, and logical operators
- Creating for and while loops
- Nesting loops
- Creating functions
- Returning values from functions
- Passing arguments to functions
- Creating recursive functions
Skill Level Intermediate
C: Data Structures, Pointers, and File Systemswith Dan Gookin2h 57m Intermediate
1. The Fundamentals of C
2. Variables and Values
3. Operators and Math
4. Decisions and Loops
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.