Join Dan Gookin for an in-depth discussion in this video Challenge: Create a pointer array, part of C: Data Structures, Pointers, and File Systems.
(techno music) … - [Instructor] Here's your chance to exercise … some pointer muscles with a challenge. … Create an array of 10 character pointers. … Prompt the user for input, … for example, to type the name of a fruit. … Assign each string input to an address … stored in the pointer array. … After the 10 strings are collected … and their address is stored in the array, output each one. … Now, here are some tips to help you. … All this activity can be done in the main function. … You don't need to create any other functions … to complete the challenge. … I recommend collecting input in a buffer, … and then copying the text input … to memory allocated for the string. … You do not need to use the dreaded double pointer notation … anywhere in your code. … This challenge should take 20 minutes or so to complete. … …
- Working with arrays
- Building a structure
- Creating an array of structures
- Testing characters
- Working with strings in C
- Using pointers to manipulate data
- Manipulating files
- Using command-line arguments
- Working with time functions
Skill Level Intermediate
1. Arrays and Structures
2. Characters and Strings
4. Files and the Operating System
5. The Interesting and Extraordinary
Next steps1m 52s
- 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.