Computer Science, asked by daryll8035, 1 year ago

Give few examples for data type date/type.

Answers

Answered by sushantshekhar1997
0

Following  are some data types :

1.integers : In integer type we  can store integer data.

  represented by "int"

ex:- int x;

       x=10;

2.booleans :  Boolean is a data type that has one of two possible values (usually denoted true and false).

ex: boolean flag;

 flag=true/false;


3.characters : Character is the data type in which we can store single character.

 represented by "char"

ex: char x;

      x="a";


4.floating-point numbers : floating data types are the data type in which we can store decimal numbers.

Represented by "float"

float x;

x=5.3;

5.alphanumeric strings:- Alphanumeric string are the data type in which we can store word,sentences,paragraph.

Represented by "string"

string s;

s="Hello this is the c/c++ world ";

                 or

s="Ram is now become 16 years old";

 Note: String must be written in double inverted coma and if you write the numbers in inverted coma it is denoted as string.  

Similar questions