Skip to Content
Learn C Programming
book

Learn C Programming

by Jeff Szuhay
June 2020
Beginner content levelBeginner
646 pages
14h 58m
English
Packt Publishing
Content preview from Learn C Programming
Understanding Scope

In every program we have created thus far, functions have been available—which means callable—from everywhere else within the program. Even in the multi-file program of Chapter 24, Working with Multi-File Programs, every function in every file is available/callable from within every other file. This is not always appropriate, nor is it desirable. Likewise, some variables should only be accessed from within specific functions, or for use within a specific group of functions.

There are many instances where it is appropriate to limit the availability of a function or the accessibility of a variable. For instance, some functions may operate on a given structure and should only ever be called by other functions that also operate ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn C Programming - Second Edition

Learn C Programming - Second Edition

Jeff Szuhay
C Programming Language, 2nd Edition

C Programming Language, 2nd Edition

Brian W. Kernighan, Dennis Ritchie

Publisher Resources

ISBN: 9781789349917Supplemental Content