MCS 011 Problem Solving and Programming Assignment Solved Assignment 2020-21

 

MCS 011 Problem Solving and Programming Assignment

Solved Assignment 2020-21

Maximum Marks : 100

There are eight questions in this assignment, which carry 80 marks. Rest 20 marks are for viva-voce. Answer all the questions. You may use illustrations and diagrams to enhance the explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation. Insert comments in the code for better understanding.


Q1. Write an algorithm, draw a corresponding flowchart and write an interactive program to convert a decimal number to its hexadecimal equivalent.

Q2. Write an interactive C program to find the MINIMUM and MAXIMUM (value) array elements in a given 3X3 matrix.

Q3. Write the following functions that:

a) Calculate simple interest.

b) Calculate compound interest. Write an interactive C (main) program to provide the above functions as options to the user using switch statement and performs the functions accordingly.

Q4. Write the following string functions that:

a) Replace a character in a given string with a character suggested by the user.

b) Convert the given string into uppercase.

c) Convert the alternate character into upper case.

d) Check each and every character in the string and display whether it is an alphabet, digit or special character. Write an interactive C (main) program to provide the above string functions as options to the user using switch statement and perform the functions accordingly.

Q5. Write a program to search a given string among the available strings, using Binary Search.

Q6. Using structures concept in C programming, write a program to calculate the daily wages for each worker (if 7 workers are employed in an iron and hardware shop) at an hourly basis of Rs.100/- (with a constraint that each worker may be allowed maximum upto 4 hours only per day). It should display the name of the worker, date and total wages for that day.

Q7. Using pointers, find the sum of all the elements of a 3X3 matrix.

Q8. Using file handling, write a C program:

(a) To generate 10 records for MCA 1st semester students and store them in stu.dat along with appropriate fields.

(b) To read the data from the file stu.dat (created above) and compute the total marks and average marks and display the grade(assumptions can be made).