dilip_devaraj
Newbie level 3
C
how to determine size of a variable without using sizeof operator
how to determine size of a variable without using sizeof operator
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int i = 1;
int count = 1;
while (i <<= 8)
{
count++;
}
//count should contain the size of the integer i in bytes.
//don't try to do this with doubles.