Showing posts with label data types. Show all posts
Showing posts with label data types. Show all posts

Tuesday, 24 June 2014

What is a reference variable and it's usage ?




A Reference Variable and it's Usage.


 DEFINITION


In C++ the reference variable is an alias  name given  for an previously defined variable.

USAGE 
 
The usage of it is that the same data object can be referred to by two names and these names can be used interchangeably.

What are data type modifiers and their affect on base data type.





Data type modifiers and their affect on base data type.




The keyword which appear before the data type and which changes its meaning , are modifiers.These are signed , unsigned , short, and long . When data type modifiers appears before a type , the meaning of the data type changes in the sense that the size gets affected.

For the sake of example let's see

An int is by default 2 bytes long and hence can represent values -32768 to 32767 but when modifier unsigned appears before it , its range becomes 0 to 65,535.

Monday, 23 June 2014

Is Char often treated as integer data type .



 Char often treated as integer data type

Basically it deals with the memory implementation of char data type is in terms of the terms of the number code (which is integer).
Therefore Because of this  , it is said to be another integer data type .

Sunday, 22 June 2014

What are data types in c++ and predefined data types in C++ ?

 


Data types in c++ and Predefined data types in C++

 
The Data types are the means to identify the type of data entered and associated operations of handling it.
 
In the C++ there are two  types of data types :
 
1. Fundamental data types These are the data types that are not composed of any other data type . There are five fundamental data types : char, int ,float, double, and void.
 
2. Derived data types These are the data types that are composed of fundamental data types . These are : array , function, pointer,reference , constant , class , structure,union, and enumertion.