sizeof
problem with sizeof operator
As i want to find array size dynamically in function, i used sizeof operator. But i got some unexpected result.[详细]
2023-02-06 19:04 分类:问答sizeof((int)(float)(char)i)) when int is defined (int)(float)(char) i;
#include<stdio.h> double i; int main() { (int)(float)(char)开发者_开发技巧 i; printf(\"%d\", sizeof((int)(float)(char)i));[详细]
2023-02-03 19:55 分类:问答Using sizeof for a pointer to a pointer to an array of 2 floats
I\'ve declared this variable: float (**explosions)[4]; This will point to a memory block of pointers to memory blocks for float arrays with 4 floats.[详细]
2023-02-02 03:42 分类:问答Guarantees on sizeof(int) in Single UNIX or POSIX
What are the size guarantees开发者_如何学JAVA on int in Single UNIX or POSIX? This sure is a FAQ, but I can\'t find the answer...With icecrime\'s answer, and a bit further searching on my side, I got[详细]
2023-02-01 19:30 分类:问答Why is the size of a class object different based on order of members?
class CHaraICICCC { int i; char c1; int j; char c2; char c3; char c4; }; class CHaraIICCCC { int i; int j; char c1;[详细]
2023-02-01 13:20 分类:问答C# sizeof object pointer (SAFE context)
Ok while sizeof(Myenum) and sizeof(int) works, I would like to use sizeof(object), but I don\'t want the size of the object, but the size of pointer... only for portability reason, I need to know if i[详细]
2023-01-30 06:07 分类:问答Sizeof doesn't return the true size of variable in C
Consider the following code #include <stdio.h> void print(char string[]){ printf(\"%s:%d\\n\",string,sizeof(string));[详细]
2023-01-29 15:24 分类:问答Sizeof Reports Improper Size of Type-defined Structure - C++
My application has a defined structure: typedef struct zsSysVersionMsg_tag { WORD cmd; BYTE len; } zsSysVersionMsg_t;[详细]
2023-01-28 22:31 分类:问答Passing a struct array into a function and performing sizeof operation upon it
I suppose much like standard arrays (i.e integer arrays), when you pass an array of structs you must pass the size of the array with it. However what I do not yet understand is that when you take size[详细]
2023-01-28 02:41 分类:问答Dealing with array size
I happened to ask myself a question about arrays in c++. Well, we all know that arrays are fixed collections of something, I say fixed because it is necessary to declare array length when defining arr[详细]
2023-01-27 10:55 分类:问答