Identify the datatype: a=10 h=1000 c=10 d=10.0" a=int b=float c=int d=float B. a=int b=float c=string d=string
Answers
Answer:
Good luck for Students Go Answer please, GÒOO
Answer:
This is known as declaration of x. As discussed earlier, it will allocate a space in the memory of the computer to 'x' and the amount of space allocated will depend on the complier.
x = 10 → It is assigning the value '10' to the variable 'x'. We can give any value to 'x'.
We have given an integer value to the variable 'x' because we have already declared that the variable 'x' is an integer - int x. If we want to give something other than an integer like a character value to 'x', then we use char before x (in place of int). Similarly, if we want to give a decimal value, then we use float or double before 'x'.
%d is for int
%c is for char
%f is for float
Let's see an example of taking and displaying a float, a double and a char value.