Home > Back-end >  sizeof
sizeof

Time:12-30

Sizeof (" w ") why would be 4
Only is equivalent to the sizeof (char), should be 1

CodePudding user response:

'w' is type int, improved type implicit, you can see the getchar () function prototype the return value of a type is type int,

CodePudding user response:

 
STD: : cout & lt; STD: : cout & lt;
Results:

CodePudding user response:

reference 1/f, confident boy reply:
'w' is type int, improved type implicit, you can see the getchar () function prototype the return value of a type is type int,

So now the 'w' is quite so ASCII

CodePudding user response:

Your quote need to lose weight, or misleading too big,

When 'w' is equivalent to the ASCII, guo jing and his mother had been called li ping, mh,

C instead of C + +, history has always said character constants (notice I didn't say type) is of type int, there are a lot of reasons but here space is narrow, written not bottom,
Let us remember that,