69 679
Assignments Done
Successfully Done
In February 2019

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)" ??

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions