Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section B.1. Variable naming conventions

B.1. Variable naming conventions

All variables, methods, and classes in an application must be provided with a name to identify them, but what makes a valid variable name?

A variable name is one type of identifier. An identifier is simply a name that uniquely identifies an element such as a variable, custom data type, or function in the source code that makes up an application. In C, identifiers can consist of any sequence of letters, digits, or underscores. They can’t start with a digit, however, and those that start with an underscore are reserved for internal use by the compiler or support libraries. Identifiers can be of any length but are case sensitive, so fooBar, FOOBAR, and FooBar are all valid identifiers that refer to different items in an application.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial