1. Kindly send the answers for this question i need it by today itself because i am having interview by tomorrow
Write a program to convert a decimal number to hexadecimal without converting it to binary.
2. Write a program to check whether the given number is a palindrome or not.(without using arrays)
3. Write a program to find a string and replace it with another string in the given input sentence.
Example:
input sentence: This is my pen
word to be replaced: is
word to replace with: was
Output should be: Thwas was my pen
4. Write a program to calculate LCM and GCD of the given two integers (without function calls).
5. Write a program to print different rotations of the given input string.
For example:
input : 4WTECH
Output:
WTECH4
TECH4W
ECH4WT
CH4WTE
H4WTEC
6. Write a program to check whether the given input number is an Armstrong number. (Without using math functions)
Example:
153=13+53+33
7. Write a program to display ,
1
2 2
3 3 3
4 4 4 4 upto n
(using single loop. Should not use nested loops.Should not use conditional statements like if.
And no function calls should be used)
8. Write a program to remove duplicates in the given array of integers and do a binary search in that.
Example:
input- Array(10)={4,5,7,8,8,9,5,5,4,2}
output- Array after removing the duplicates,
{4,5,7,8,9,2}
Input- Number to search- 5
Output- Position of 5 is -1
9. Write a program to delete an element from an array.(using a single array)
10. Write a program to rearrange the contents of an integer array so that all the odd elements are placed before the even.
Example:
Input-Array(12)={6,23,5,16,78,4,8,7}
Output- Array(12)={23,5,7,6,16,78,4,8}
11. Write a program to count the number of binary 1's in the given input number
Example
Input – 8
Output -1
12. Write a program to convert the given input string from lower case to upper case without using in-built functions.
13. Write a program to generate Fibonacci series and find the sum of the series.
Fibonacci series:
1 1 2 3 5 8 13...