- A string is a funny thing.…It's not really a C language variable,…but it's used that way.…And, when it comes to manipulating strings in your code,…you have to be really careful due to their unusual nature.…This movie discusses working with strings.…I'll show you how to gather information about a string,…stick strings together, compare strings,…and find one string inside another.…These tasks represent the more popular…string manipulation functions in the C language.…A string is declared at line six.…
It's a character array,…so the char variable type is specified.…And the variable name is string, followed by empty brackets.…The string length function, strlen, appears at line nine.…I pronounce it "stringlen" because it means string length.…It returns the number of characters in a string,…which here is stored in the len variable.…Build and run this code.…The string is 19 characters long.…You can also count the characters in the source code,…but you won't always have the luxury…of knowing the exact amount.…
For example, what if the user types in a string?…
- Understanding a C program
- Adding comments
- Using escape characters
- Working with values and placeholders
- Introducing variables
- Making a decision with if
- Adding functions
- Manipulating strings
- Building arrays
- Nesting structures
Skill Level Beginner
1. Getting Started
2. Programming Basics
3. Program Flow Control
4. Intermediate C Language Concepts
5. Advanced C Language Concepts
Next steps2m 11s
- 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.