he guarantee you get is that sizeof(char) == 1
. There are no other guarantees, including no guarantee that sizeof(int *) == sizeof(double *)
.
In practice, pointers will be size 2 on a 16-bit system (if you can find one), 4 on a 32-bit system, and 8 on a 64-bit system, but there’s nothing to be gained in relying on a given size.
Related Posts:
- What does “dereferencing” a pointer mean?
- What does “dereferencing” a pointer mean?
- What is the difference between const int*, const int * const, and int const *?
- What is the difference between const int*, const int * const, and int const *?
- How to make an array with a dynamic size? General usage of dynamic arrays (maybe pointers too)?
- Typedef function pointer?
- What is the use of intptr_t?
- Why use pointers?
- What’s the difference between * and & in C?
- Warning: comparison of distinct pointer types
- Difference between the int * i and int** i
- What is a segmentation fault?
- What is the difference between float and double?
- Why are #ifndef and #define used in C++ header files?
- Floating point exception( core dump
- Return array in a function
- Mutex example / tutorial? [closed]
- Regular cast vs. static_cast vs. dynamic_cast
- What is an unsigned char?
- What is a smart pointer and when should I use one?
- Convert char to int in C and C++
- How to fix a “invalid operands to binary expression” error?
- How to track down a “double free or corruption” error
- How to go from fopen to fopen_s
- What is a dangling pointer?
- What does `*&` in a function declaration mean?
- (->) arrow operator and (.) dot operator , class pointer
- Difference between long double and double in C and C++ [duplicate]
- What is use of c_str function In c++
- What is the C version of RMI
- How to print pthread_t
- What is uintptr_t data type
- Pointer to incomplete class type is not allowed
- Fastest way to check if a file exist using standard C++/C++11,14,17/C?
- Difference between using Makefile and CMake to compile the code
- What is the difference between a static and const variable?
- Should I learn C before learning C++?
- Eclipse C++ : “Program “g++” not found in PATH”
- Visual Studio debugger error: Unable to start program Specified file cannot be found
- unsigned int vs. size_t
- Convert Python program to C/C++ code?
- error: expected primary-expression before ‘)’ token (C)
- What does ** do in C language?
- Is “argv[0] = name-of-executable” an accepted standard or just a common convention?
- What is activation record in the context of C and C++?
- How to create a dynamically-allocated array of const objects, but have values assigned to them?
- Fastest way to check if a file exist using standard C++/C++11,14,17/C?
- How to access the contents of a vector from a pointer to the vector in C++?
- Fatal error: ‘stdafx.h’ file not found
- warning: control reaches end of non-void function [-Wreturn-type]
- C++: Expression must have a constant value when declaring array inside function
- gcc/g++: “No such file or directory”
- What does ‘const static’ mean in C and C++?
- Sorting Linked List C++ with pointers
- Delete 2D array C++
- Best C/C++ Network Library
- 2D array vs array of arrays
- How do malloc() and free() work?
- How to run valgrind with basic c example?
- C++ strings and pointers
- initial value of reference to non-const must be an lvalue
- Debug vs Release in CMake
- How can I get the list of files in a directory using C or C++?
- C++ – Assigning null to a std::string
- What are the different versions of exec used for in C and C++?
- What’s the difference between nexti and stepi in gdb?
- C++ – Too Many Initializers for Arrays
- Reading string by char till end of line C/C++
- Is there a replacement for unistd.h for Windows (Visual C)?
- C++ – include unistd.h: why not cunistd?
- error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’
- How to project a point onto a plane in 3D?
- Using C-string gives Warning: “Address of stack memory associated with local variable returned”
- gcc: undefined reference to
- Reference to non-static member function must be called
- I get this error: “glibc detected”
- Difference between pic Vs pie
- What does ** mean in C?
- Double pointer array in c++
- What’s the meaning of exception code “EXC_I386_GPFLT”?
- C++ pass an array by reference
- Get size of pointer in C
- C: pointer to array of pointers to structures (allocation/deallocation issues)
- gcc -g :what will happen
- What is the source of the data for the ProgramFiles, ProgramW6432Dir, ProgramFilesDir (x86), CommonProgramFiles environment variables?
- What is the job of autogen.sh when building a c++ package on Linux
- What’s the Use of ‘\r’ escape sequence?
- Is there a standard sign function (signum, sgn) in C/C++?
- Why should I use a pointer rather than the object itself?
- Using OpenMP with clang
- C++ correct way to return pointer to array from function
- Two decimal places using printf( )
- Initializing pointers in C++
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Is there a way to compile C++ to C Code?
- What is a `char*`?
- clearing a vector of pointers [duplicate]
- Whats the difference between UInt8 and uint8_t
- C++ Swapping Pointers
- Array of Linked Lists C++