Join Eduardo Corpeño for an in-depth discussion in this video Sort and search main, part of C Standard Library.
- [Instructor] Here's an example application…where I will run b search twice in an array…that's the array defined in 9.14 which is called…nums and it's an array of ten integers.…As you can see it's not sorted in any particular way…and I will look for one number that I know…is in the array first and then I'll look for…a number I know is not in the array.…Now remember that b search requires the array…to already be sorted and so I will have to…call q sort so this application will show both functions.…
As you can see I have already written some code…so I want you to pay attention to line four…where I have a function that prints out the array.…It's called print array and you may want to…take a minute to verify what it does…but it's just printing out integers.…We also have a series of comments in the code…that act as a to do list to fill in the blanks.…So as you can see in lines ten and eleven…we have to write a compare function and a find function.…
The compare function is the call back required by…b search and q sort and the find function…
- 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.