Join Eduardo Corpeño for an in-depth discussion in this video String manipulation example, part of C Standard Library.
- [Speaker] So here we have, as usual,…some codes with comments to fill in the blanks.…And in this application, I will use…three strings that we have in lines…five, six, and seven.…These say, hi, there, and some dashes.…So as written in lines 12 and 13…I will first concatenate string one and two…so that I get, hi there.…And remember that the function strncat…does it by upending string two to string one.…
And then I will copy the whole content…of string one, which now says hi there…to the string number three.…And so both string one and string three…will read the same thing.…And as you can see, I print string one, two, and three…before doing those changes and after doing them.…So let's write those two lines.…So to concatenate both strings,…let me run strncat,…string one, string two,…and the maximum number of characters I want to concatenate.…
So let me use 10.…And now to copy string one into string three,…I'll use strn copy, str3 which is the destination,…str1 which is the source,…and the count will again be 10,…because my strings are 10 characters long.…
- Working with header files
- C constants and types
- Unformatted and formatted input/output
- Accessing files with C functions
- Generating random numbers
- Converting strings
- Sorting and searching for data
- Manipulating strings
- Using mathematical functions
Skill Level Intermediate
C++ Standard Template Librarywith Eduardo Corpeño2h 23m Advanced
1. The C Standard Library
2. Input and Output Library: stdio.h
3. General Purpose: stdlib.h
4. String Functions: string.h
5. Mathematical Functions: math.h
- 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.