Cognizant interview question

write program for pointers in C and Java