Join Dan Gookin for an in-depth discussion in this video Understanding variables, part of Learning C (2014).
- A variable is a container for some type of data.…In the C language that container holds an integer,…floating point, character, or other value.…But philosophically speaking, what actually is a variable?…In this movie I help you explore the concept of the variable.…You'll see various ways a variable is described,…how to determine its size and its storage location.…In the typical C language variable declaration…you learn two tidbits about the variable.…
Its type and its name.…Here you see an integer variable declared.…It's an integer variable, int, and its name is a.…The variable is uninitialized or never assigned a value.…Even so, you can use it in the code as is shown…in line 7, Build and Run the program.…On my screen, the value of a is equal to 50.…You might see the value zero, although that's just random.…Unlike other programming languages,…C does not initialize variables as they're declared.…
Internally, the program allocates a chunk…of memory to store the variable's information.…That chunk isn't initialized, it's not set to zero.…
- 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.