Advanced Topics in C: Using Strings, Header Files, & Type Conversions
C 17
| Expert
- 15 Videos | 1h 45m
- Includes Assessment
- Earns a Badge
Strings are the most fundamental way of representing text in any programming language. In C, they take the form of character arrays, delimited with a special character. Because of the equivalence between arrays and pointers in C, strings can also be represented using character pointers. Start this course by creating strings as arrays of characters, observing that the end of a string is delimited using the \0 character. Discover how strings are stored in character pointers and iterate over strings with pointer arithmetic and use the strlen(), strcpy(), strcmp() and strcasecmp() functions. Next, learn how to create header files and use the #include preprocessor directive to pull in both system and user-created header files. Explore type conversions and learn about implicit conversions. Finally, explore command line arguments including the use of argc and argv, and how these can be used in your C programs. Upon completion, you'll be able to to work with C strings using character arrays, library functions, and header files, perform type conversions, and use command line arguments in C programs.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this courseoutline the process of creating strings in character arrayscreate strings as pointerscreate shallow and deep copies of stringsidentify issues with storing strings as pointersadd strings to character pointerscompare strings using strcmp() and strcasecmp()outline how to create header files and use functions from them
-
reference user-defined header filesadd guardrails against multiple inclusions for header filesidentify key components of type conversion in Cidentify implicit type conversionsidentify the results of performing explicit type conversionsuse command-line input argumentssummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 8sUP NEXT
-
2.Creating Strings in Character Arrays7m 38s
-
3.Creating Char* Pointers to Represent Strings8m 22s
-
4.Creating Copies of Strings8m 39s
-
5.Exploring Errors When Storing Strings in Pointers4m 20s
-
6.Using the Strcat() Function6m 20s
-
7.Comparing Equality of Strings6m 47s
-
8.Introducing Custom Header Files8m 13s
-
9.Using User-defined Header Files6m 53s
-
10.Preventing Header Files from Being Included Twice7m 51s
-
11.Type Conversion in C9m 30s
-
12.Exploring Implicit Type Conversions7m 7s
-
13.Performing Type Casts6m 41s
-
14.Accepting Command Line Input Arguments10m 22s
-
15.Course Summary4m 10s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.