Skip to main content

How to declare the variables

We can declare and define variables using the below format : 


datatype variable_name;

(or)

datatype variable_name = initial_value;


Some Examples : 

int a;

float c;

char ch;

int value = 10;

double d = 5.26;

char mycharacter = 'f';

boolean b = true;


NEXT

Comments