+ 6

Does this mean we have only 4 data types?

int = 4 float = 4 double = 8 char = 1

12th Apr 2019, 11:51 PM
Jonathan Kofi
Jonathan Kofi - avatar
9 Respostas
+ 18
C has the following simple data types: // Size (bytes) • char // 1 • unsigned char // 1 • short int // 2 • unsigned short int // 2 • (long) int // 4 • float // 4 • double // 8 https://www.sololearn.com/learn/C/2912/
13th Apr 2019, 2:35 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 5
You need to specify the language.
13th Apr 2019, 2:03 PM
Sonic
Sonic - avatar
+ 2
You forgot String
13th Apr 2019, 12:04 AM
José Ngoyi
José Ngoyi - avatar
+ 2
We have Derived data types also. In C ex: struct, the union, array, and enum which are derived from basic data types like char, int etc.,
13th Apr 2019, 5:09 AM
Kuri
Kuri - avatar
+ 1
Bytes
13th Apr 2019, 12:02 AM
Dlite
Dlite - avatar
+ 1
José Ngoyi strings is like an array of characters
13th Apr 2019, 12:05 AM
Dlite
Dlite - avatar
+ 1
It's a data type
13th Apr 2019, 12:06 AM
José Ngoyi
José Ngoyi - avatar
+ 1
Alright
13th Apr 2019, 12:07 AM
Dlite
Dlite - avatar
+ 1
Data type non-primitive. Update your list : int num = 4; float floatNum = 4,99f; char letter = 'D'; boolean bool = true; String text = "Hello"; 
13th Apr 2019, 12:14 AM
José Ngoyi
José Ngoyi - avatar