I'm learning C++ with a how-to book and am very new, so please bear with me. What does the term "int" mean? How/why is it used? Is there a specific reason why it's in lowercase?
What does the phrase "int" mean in the C++ language?
and int is as he said. it can only stor real number(not decimal point) and the reason its like int adn blue is because c++ is object orientated adn the 'int' is a keyword. meaning it cant be used a a name for a variable. here is a site that will realy help you with your c++, jsut dont give up....
http://www.fredosaurus.com/notes-cpp/ind...
Reply:int is short form of Integer. int means the type of variable that stores the integer value. eg. int i. so i is a variable that can store only integer value like 1,2,3,etc but not something like 1.2 or 1.5. int variables have 2 bits. this is just introductory. u can google for more information.
Reply:As many have said, int is short for integer. It is usually used as a variable declaration:
int x = 5;
Declares a variable x of type integer, and assigns it a default value of 5. It can also be used as a casting variable:
long bigNumber = 3845757839238477;
int v = (int)bigNumber;
Here, an integer named v is declared and is assigned the value of the long v. A long is just like an integer, except it can have a wider range of values, hence the name long! (it's longer than int). Here I used the 'int' statement to cast bigNumber to an integer and assign it to v.
Reply:int is integer number; no reason for being lowercase but just convenient to do so.
Integer numbers are whole numbers, this kind of number in computers are more efficient and stocastic to use than float. If you want an elaboration on fractional numbers within computers wiki the terms "floating point" and "fixed point".
Reply:"int" is shorthand for Integer, meaning a Number!
Happy Coding! And please rate me as best Answer! ;)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment