Answer all the problems. You may use illustrations and diagrams to enhance the explanations. Insert comments in the code for better understanding.
problem1) prepare the C program to determine perfect numbers from 1 and 50.
problem2) prepare the algorithm, to draw corresponding flowchart and prepare the interactive program to convert binary number to its octal equivalent.
problem 3) prepare a function strreplace(s, chr, repl_chr) that would replace each occurrences of character chr with character repl_chr in the string s. The function returns number of replacements. Place the source code of this function in the file named strreplace.c
problem 4) preparer the interactive C program to check if the given string is a palindrome or not, using pointers.
problem 5) prepare the interactive program called “WEIGHT CONVERTER” which accepts weight in milligrams / decigrams / centigrams / kilograms /ounces / pounds / tons and displays its equivalent in grams.
problem 6) prepare the interactive program to generate pay slips for the staff of size 12 employees (2 members are clerks, one computer operator, 6 salesmen, 3 helpers) , working in a small chemist retail shop. Assumptions could be made wherever necessary. Payslip must display the employee no., employee name, no. of days worked during the month, date of generation of the payslip, month for which the salary is being paid, all the details of the payment, deductions, gross-pay and net-pay.