Cognizant interview question

what is inheritance? what is array, link list, pointers. write a code to find prime numbers up to 50.