Friday, July 29, 2016

C Basics - Initialization in C

An initializer is a value or a sequence of values to be assigned to the variable being declared. You can set a variable to an initial value by applying an initializer to the declarator in the variable declaration. The value or values of the initializer are assigned to the variable.

There are three type of variable initialization.
  • Scalar types - include all the arithmetic types, plus pointers.
  • Aggregate types - include arrays, structures, and unions.
  • String types – initialize an array of characters



Related topics:
Data Types - Type Specifiers in C   |   Const and Volatile - Type Qualifiers in C   |   Variables in C   |   Local and Global Variables in C   |   Constants in C

List of topics: C Programming

No comments:

Post a Comment