1. How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
2. Explain polymorphism citing an example.
3. What are the 4 basics of OOP?
4. Define Data Abstraction. What is its importance?
5. Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array.
i) 3 2 7 10 should return 13 (sum of 3 and 10)
ii) 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
6. Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can’t pass the value k to any function also.
7.You are given some denominations of coins in an array (int denom)and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
8.Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number.
9.Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.
10.Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren't present.