60 622
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #67217 in C++ for Eunsu Kim

Question #67217
#define KB * (0x1 << 10)

I think it's written to show kilobyte as KB. what is * (star) ??

what is difference with this "#define KB (0x1 << 10)" ??

thanks
Expert's answer
Firstly, star (*) sign means a pointer (or reference) to a variable.

Secondly, there is impossible to get the address of const value (0x1 << 10), so calculation of expression *(0x1 << 10) will always cause a compilation error.

Also, probably, the task is incomplete to understand what is asked correctly.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions