doodh
2010-06-18 12:25:55 UTC
int *c;
c=(int*)malloc(30);
Here, the casting the void* returned by malloc to int*, is actually just making the compiler sure that the programmer knows what he is doing and he is doing that on purpose. Other than that, casting here doesn't achieve anything special. Is this right ?
isn't this the purpose of type casting, in general too ?