0
What data type should i choose?
so that i ask the user to enter their name and then the program says hi,[name]
2 odpowiedzi
+ 4
The general data types in all languages are:
char --> a single character
string --> a string of characters
int --> integers
float --> numbers with decimals e.g. 5,3
double --> also numbers with decimals but has more digits e.g. 3,1415926...
boolean --> true/false
Most languages support long type.
Add long before int or float/double so that you allocate more memory to your variable
e.g. a long int has much more digits than a simple int
+ 2
For a "string" of characters (more than one char), use a string type variable.