Top "Sizeof" questions

sizeof refers to the Standard C/C++ operator for returning the size in bytes of an expression or datatype.

Maximum size of size_t

I know in C return type of sizeof operator is size_t being unsigned integer type defined in <stdint.…

c gcc sizeof c99 size-t
Why is the size of an empty class in C++ not zero?

Possible Duplicate: C++: What is the size of an object of an empty class? Why does the following output 1? #include &…

c++ sizeof
Sizeof vs Strlen

#include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { char string[] = "october"; // 7 letters …

c sizeof strlen
How does this "size of array" template function work?

Can someone explain how this code works? I know that the purpose of this code is to get the length …

c++ arrays templates size sizeof
Sizeof string literal

The following code #include <iostream> using namespace std; int main() { const char* const foo = "f"; const char bar[] = "…

c++ string sizeof
Should I always include stddef.h if I use sizeof and size_t

if I'm using the sizeof operator and making use of size_t in my code, do I have necessarily have …

c sizeof size-t
Does sizeof return the number of bytes or the number of octets of a type in C?

Simply put in C and variants (unlike that wuss java with its virtual machine) the size of primitive types on …

c byte sizeof word-size
C sizeof a passed array

Possible Duplicate: How to find the sizeof( a pointer pointing to an array ) I understand that the sizeof operator is …

c arrays function sizeof
Sizeof struct in Go

I'm having a look at Go, which looks quite promising. I am trying to figure out how to get the …

struct go sizeof
Checking the size of an object in Objective-C

I'm trying to find the size of an objective-c object. I'm using something similar to: NSLog(@"sizeof myObject: %ld", sizeof(*…

c objective-c sizeof