Why do not print this data type | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why do not print this data type

I have print int, char, double, float. But why do not print boolean and pointer data type. How many memory allocate use of sizeof () function.

20th Feb 2019, 5:38 AM
Deepti Dixit
Deepti Dixit - avatar
3 Answers
+ 3
//if you are having trouble with code then visit this lesson, here is 📊 chart showing all size of operators //Please put a relevant tag in your question https://www.sololearn.com/learn/CPlusPlus/1633/?ref=app
20th Feb 2019, 6:54 AM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
I guess you're talking about this code? Use _Bool for booleans or #include <stdbool.h> to be able to use the macro "bool". For pointers, try void* or any other type (size will be the same for each type of pointer) https://code.sololearn.com/c6lm67t7KVGE/?ref=app
20th Feb 2019, 6:55 AM
Anna
Anna - avatar
+ 1
Thanx now my dought clear
20th Feb 2019, 12:36 PM
Deepti Dixit
Deepti Dixit - avatar