Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

ptr_one = (int *)malloc(sizeof(int)); what is (int *)?

OpenStudy (anonymous):

What does (int *) supposed to do?

OpenStudy (espex):

Casts it as an integer pointer.

OpenStudy (rsmith6559):

malloc() returns a void (untyped) pointer. The pointer that malloc() returns has to be changed (cast) to the type you want to use the memory for.

OpenStudy (anonymous):

int* is a pointer..in java they are called references

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!