Programming Hub C,C++,C#,Asp.Net,Ado.Net,Java,  HTML,SQL.

This Blog Post Only Education Purpose For All Education Related Blogs and Articles Post Here.Download Free Software and Study Materials Mores..

Showing posts with label Derived or Composite Data Type. Show all posts
Showing posts with label Derived or Composite Data Type. Show all posts

Sunday 4 September 2016

Data Type in Programming Languages

12:37:00 pm 0

We had study about data type in all computers programming language, so I know about these data types. Every computer programming language has its own set of data types.
There are two types of data types.

We have discussed about derived / composite data type. These data type derived from the basic / primary data type.
1.     Array:- generally variable are capable of holding pnly one value at a time . if you want to store more than value at a time in a single variable we use arrays.  Arrays is also sequence of object.
Eg:- int num [5];
Reserve a sequence of five location of 2 bytes, each for storing interger num[0], num[1], num[2], num[3], num[4];
2.     Pointer: - is used to store the address of memory location.
Example:-          int n;
int *ptr;        //pointer to an interger
The following statement assign the address location of the variable ‘n’ to ‘ptr’ and ‘ptr’ is a pointer to ‘n’.
ptr=&n;
3.     Structure: - structure is collection of different type of variable.
Example: - structures of employee data i.e. name, salary, age, address e.t.c.
4.     Union: - union is collection of variables of different types sharing common memory space.
5.     Enumerated: - (enum) its members are the constant that are written as.
Identifiers data type through they g=have signed integer values that can be assigned to corresponding enumeration variables.
Enum tag {memebr1, member2, member3…….membern};
Example:- enum color{red, blue, green, white};





You Might Also Like

Developing Data-Centric Windows Applications using Java

Developing Data-Centric Windows Applications using Java Introduction The Core Java Programming and JDBC course provides an introd...

Unlimited Reseller Hosting