what Variables r there?
i know what is int and float.
but can i type a full sentences as a Variables?
what Variables r there?
i know what is int and float.
but can i type a full sentences as a Variables?
>i know what is int and float.
Those are types. Variables are whatever you want as long as the name isn't a reserved word.
>but can i type a full sentences as a Variables?
You can, but you need to get creative in separating the words of the sentence:
Code:double some_long_variable_name_that_represents_a_double;
My best code is written with the delete key.
TYPE - MINIMUM SIZE (BYTES)
char - 1
unsigned char - 1
int - 2
unsigned int - 2
short - 2
unsigned short - 2
long - 4
unsigned long - 4
float - 4
double - 8
Do you mean, "Can a variable hold a sentence?" No. A single variable can only hold a single character. You need an array of characters to hold a word or sentence. See the array and string tutorials. C++ also has a string class which can sometimes be used more like a single variable.but can i type a full sentences as a Variables?
in general programming terminology, string means "a string of characters". In C++, a character array is often called a c-style string to differentiate it from a C++ string class object.