cpp:

CPP Data Types

https://stackoverflow.com/questions/2550345/whats-the-difference-between-unsigned-long-long-int-in-c-c Type Typical Bit Width Typical Range char 1byte -127 to 127 or 0 to 255 unsigned char 1byte 0 to 255 signed char 1byte -127 to 127 int 4bytes -2147483648 to 2147483647 unsigned int 4bytes 0 to 4294967295 signed int 4bytes -2147483648 to 2147483647 short int 2bytes -32768 to 32767 unsigned short int Range 0 to 65,535 signed short int Range -32768 to 32767 long int 4bytes -2,147,483,648 to 2,147,483,647 signed long int 4bytes same as long int unsigned long int 4bytes 0 to 4,294,967,295 float 4bytes +/- 3.

by lek tin in "data-types" access_time 1-min read

Arrays in CPP

To get the number of elements in an array in C++: sizeof(awesomeArray) = total number of bytes allocated for awesomeArray array. Divide it with the size of one element in the array will give you the number of elements in the array: sizeof(awesomeArray)/sizeof(awesomeArray[0])

by lek tin in "programming-language" access_time 1-min read