Is this code legal?int *ptr; ptr = (int *) 0x400; Answer: YesExplanation:The pointer ptr will point at the integer in the memory location 0x400.