The typedef keyword aliases new data types based upon an existing type, though the new type can be used for a specific purpose. Many of the unfamiliar data types encountered when using various C language functions are created in the header file by using a typedef statement.
- [Instructor] As you learn the C language, … you discover data types that aren't among the clutch … of C language keywords. … These are defined variable types known as typedefs, … such as the time_t typedef shown here at line six. … As an experienced C programmer, … I draw the conclusion that time_t is defined … in the time.h header file included in line two. … Further, see how the time_t data type … is highlighted in the source code here. … Even the editor recognizes this data type. … So, if time_t isn't a car, aint float or double, … what is it? … Specifically, time_t is defined to store a clock tick value. … The number of seconds that have elapsed since Thursday, … January 1st, 1970. … This date is known as the Unix epoch. … The time function obtains the system's current Epic value, … saving it in the time_t variable now. … The C time function translates … this value into a human readable string, … which the print f function outputs, build and run. … The output is current to whenever you run the program. …
- Writing your first C program
- Working the C development cycle
- Adding comments to code for clarity
- C language data types
- Declaring variables
- Making new data types
- Typecasting variables
- Using math, assignment, and logical operators
- Creating for and while loops
- Nesting loops
- Creating functions
- Returning values from functions
- Passing arguments to functions
- Creating recursive functions
Skill Level Intermediate
C: Data Structures, Pointers, and File Systemswith Dan Gookin2h 57m Intermediate
1. The Fundamentals of C
2. Variables and Values
3. Operators and Math
4. Decisions and Loops
Next steps1m 38s
- 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.