Lesson 12. Understanding Variable Scope

In Lesson 5, “Packaging Code in Functions,” you saw that a variable defined within a function is different from a variable defined outside a function. Without knowing it, you were introduced to the concept of variable scope, an important aspect of C programming. In this lesson you learn:

Image About variable scope and why it’s important

Image What external variables are and why you should usually avoid them

Image The ins and ...

Get C Programming in One Hour a Day, Sams Teach Yourself, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.