[C/C++] size_t | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[C/C++] size_t

Please, help me to understand what size_t does in C/C++.

9th Aug 2019, 9:03 AM
NexusBot
4 Answers
+ 3
size_t is unsigned int. It is used to define the size of an object.
9th Aug 2019, 9:09 AM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 2
The return type of the sizeof operator is also size_t.
9th Aug 2019, 9:22 AM
Sonic
Sonic - avatar
+ 1
CarrieForle Thanks a lot!
9th Aug 2019, 9:10 AM
NexusBot
+ 1
size_t actually mean an unsigned integer which equally defines the size of an integer variable. When you see unsigned, it means it has no sign. Only the invisible positive. When you see signed, it means has a sign. Either negative or the invisible positive.
9th Aug 2019, 10:59 AM
Franky BrainBox
Franky BrainBox - avatar