C++ All Programs of C++ Languages |
Advertisement |
|
Thread Tools | Display Modes |
|
(#1)
|
|
||||
Primitive Data Types In C++ -
>>
Show Printable Version
Email this Page
04-04-2014, 02:54 PM
Primitive Data Types In C++ The primitive data types in C++ language are the inbuilt data types provided by the C++ language itself. Thus, all C++ compilers provide support for these data types. The following primitive data types in C++ are available: Integer data type is used to declare a variable that can store numbers without a decimal. The keyword used to declare a variable of integer type is “int”. Syntax: int variable_name; Float data type declares a variable that can store numbers containing a decimal number. The keyword used to declare a variable of float type is “float”. Syntax: float variable_name; Double data type also declares variable that can store floating point numbers but gives precision double than that provided by float data type. Thus, double data type are also referred to as double precision data type. The keyword used to declare a variable of double type is “double”. Syntax: double variable_name; Character data type declares a variable that can store a character constant. Thus, the variables declared as char data type can only store one single character. The keyword used to declare a variable of character type is “char”. Syntax: char variable_name; Unlike other primitive data types in C++, void data type does not create any variable but returns an empty set of values. Thus, we can say that it stores null. Syntax: void variable_name;
➳ bE driveN wiTh puRpOse, Be r313n71355 in your alιgnмenт; with excellence. pAy n0 mInd to the ∂ιsιмραssισηε∂ เ๓ק๏tєภt ђคtєгร ♬ ☣ .. нoolιgan ☠
|
Sponsored Links |
|
Bookmarks |
Tags |
data, primitive, types |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blood Types | (‘“*JiĢäR*”’) | Miscellaneous | 5 | 11-19-2013 08:40 AM |
Two types | Humaila | Hadees Shareef | 6 | 02-03-2012 10:15 PM |
two types persons........ | kashan memon | Urdu Sms | 10 | 11-12-2011 10:11 PM |
Types of man | AYAZ | Jokes | 9 | 10-11-2011 12:00 AM |
: Types Of Janaat : | !~*AdOrAbLe*~! | Islamic Issues And Topics | 4 | 04-27-2011 12:39 AM |