+ 3
Data types in C
Could you plz explain me what is data types in C language??
7 odpowiedzi
+ 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/
+ 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.☺
+ 5
As C is statically typed, you need to specify the data type of a variable when declaring it.
+ 2
thank you
+ 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.
+ 1
thank you plz explain more
+ 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