Question : When do I chose what variable to select? like int, char, double?

I dont seem to grasp the concept of of when i should select char, int, or double? can someone please help me understand the method to select the proper variable?

Answer : When do I chose what variable to select? like int, char, double?

The choice usually depends on the type of real-world data you want to represent. Don't be put off by the unusual names, these three are quite straight forward:

char  ->  single characters, e.g. 'a', 'b', 'c', ... '1', '2',... '*','#',..
int     ->  the natural numbers, e.g. 1,2,3,...
double ->  the real numbers, e.g. 1.234, 0.1234, 123.456,...

Each require different amounts of memory and there may be other considerations when doing advanced programming but, in general the real-world data determines your choice.

Hope this helps.
Random Solutions  
 
programming4us programming4us