+ 5

What is a data type?

17th Mar 2019, 5:55 AM
palaparthi angelvineelarani
8 odpowiedzi
+ 11
In programming we deal with information. Every information is called as 'constant' in our program. While programming, you may come into a situation where you have to store this information or say "constant" in your program. To achieve it, we use variable in our program to store data. Ex: - int x = 5; Here x is a variable and 5 is information or constant. But what about "int"???? What is it??? Wait a second buddy. In programming, we also have to tell the compiler " What type or kind of data we want to store" And that type or kind of information is called or referred to as a "data type". There are built-in or primitive data types in programming which are already defined in a programming language. Well, you can also create your own data types by simply creating a " Class"!!!!! Well, it's a Oop topic!! And it is a out of topic thing so I want to put an end to my answer buddy!!!! Hope you like it!!!!!!
17th Mar 2019, 10:49 AM
Ayush Sinha
Ayush Sinha - avatar
+ 3
A datatype is a set. For example, the integers are the set { ... , -2, -1, 0, 1, 2, ... } When you say "variable x is of type integer", you mean that it can only be one of the values in that set, and it can't be anything else (like 1.3, "horse", etc.)
17th Mar 2019, 6:31 AM
Schindlabua
Schindlabua - avatar
+ 1
That's declare that what is the type of a data
20th Mar 2019, 2:55 AM
Praval Pratap Singh
Praval Pratap Singh - avatar
+ 1
Data type is the format of data we input. i.e. whether it is characters, text, integers (whole numbers), decimal values (fractions) etc. Character is denoted by - char Text is denoted by - string Whole numbers - int Fractions - float or double Hope it's useful.
21st Mar 2019, 7:08 PM
Vasanthamalika
Vasanthamalika - avatar
+ 1
data type specifies that which type of value of a variable.For example char,int etc
21st May 2019, 3:47 AM
Sailakshmi Janjanam
0
Depend your questions behaviour who has to choose your data type i.e int, float,char ok
26th Mar 2019, 11:33 AM
Anil Kumar Sing
Anil Kumar Sing - avatar
0
A data type in a programming is a classification that specifies which type of value of a variable like int,float. etc
11th Apr 2019, 3:09 PM
Sailakshmi Janjanam
0
Data type is like the identity of the variable which you declare like in laymen example Delhi is capital and India is country Delhi capital; Indian country; USA country; Dhaka capital; And these capital and country are different in term of size
1st May 2019, 5:34 PM
Divey Jangra
Divey Jangra - avatar