+ 3

Data types in C

Could you plz explain me what is data types in C language??

6th Nov 2020, 6:28 AM
Y.Rashid
Y.Rashid - avatar
7 Respostas
+ 8
There is a chapter covering an intro to data types here. I don't know whether you have got to it, but there isn't really much to tell except for what was given there https://www.sololearn.com/learn/C/2912/
6th Nov 2020, 6:36 AM
Ipang
+ 6
data type is used to assign data under a variable. like int (integer)data can assign from (-214748648) to (214748647.) and you see also see the other data types like double.it is used to asign a decimal number like , double a; a=1.2; to print double type data,you need to use %lf by replacing %d %d is used to print the integer type data.and %lf is used to print double type data.And here is a nother data type which is char.It is used assign single characters. Like char a = 'A'; to print char type data , use %c . Include it for printing char type datas .More info at solo lean. Hope I helped you happy coding.☺
6th Nov 2020, 7:07 PM
Minhazur Rahaman Ratul
Minhazur Rahaman Ratul - avatar
+ 5
As C is statically typed, you need to specify the data type of a variable when declaring it.
6th Nov 2020, 9:10 AM
Sonic
Sonic - avatar
+ 2
thank you
6th Nov 2020, 6:37 AM
Y.Rashid
Y.Rashid - avatar
+ 2
Main types. The C language provides the four basic arithmetic type specifiers char, int, float and double, and the modifiers signed, unsigned, short, and long.
7th Nov 2020, 7:17 AM
Manas Sahu
Manas Sahu - avatar
+ 1
thank you plz explain more
6th Nov 2020, 8:43 AM
Y.Rashid
Y.Rashid - avatar
+ 1
Data types describes that which type of data are you going to store in your variable. And accordingly allots memory space to a veriable For example char data type stores character value and had alloted 1byte memory int have integeral value and alloted 2byte memory
6th Nov 2020, 6:04 PM
Amit Maindola
Amit Maindola - avatar