Thursday, March 11, 2010

Declaring and Initializing Variables

You can declare and initialize variables by using the following syntax:

=;

In the preceding syntax, the represents the kind of data type that will be stored in a variable and specifies the vlue that needs to be stored in avariable

Consider the following statement of variable declarations:

int age;

The preceding statement declares the variable choice of the char data type and initlizes the variable with the value y.

The data type represents the kind of data that will be stored in a variable

No comments:

Post a Comment