Q1: Write a program to take input for n number of doctor records and write records of all cardiologists in a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are taking salary more than INR 80,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor: doc_id, doc_name, doc_specialization, doc_salary]
2. Array is the simplest data structure where each data element can be randomly accessed by using its index number. Write a complete C program to create an array and perform the following, using functions.
a. Create an array to store some characters.
b. Get a word (which contains lower case letters only) from the user and store the letters in the array according to the order of letters.
(Ex: If the user Input = campus; Array = ‘c’ ‘a’ ‘m’ ‘p’ ‘u’ ‘s’)
c. Display the elements of the array.
d. Add uppercase letters (A, B, C, …) in between each letter in the array. Then your array length become double. Display the elements of the array.
(Ex: If the Array = ‘c’ ‘a’ ‘m’ ‘p’ ‘u’ ‘s’; After inserting numbers, the array = A c B a C m D p
E u F s)
e. Remove all the lower case letters from the array. Then your array will shrink back to the half size. Display the elements of the array.
(Ex: If the array = A c B a C m D p E u F s; then array = A B C D E F)
f. Display the array again in reverse order.
Make a c++ that will calculate the total expenses and cash left of Miss Carla after spending the following:
Cash-4,050.00
B&W perfume-700.50
B&W lotion-560.85
Dresses-2072.50
Note: the program must display the cash left and total expenses.
by CodeChum Admin
They said pyramids were created by aliens, so if you can make a pyramid you might be able to qualify as an alien.
Instructions:
Input
1. Integer n
Output
Enter·n:·4
T
TT
TTT
TTTTby CodeChum Admin
Most, if not all things have numeric values. That goes for characters too. In order to find out which character has a higher value, we have to compare them with each other and display the value of the higher character.
Instructions:
Input
1. First character
2. Second character
Output
Enter·first·character:·a
Enter·second·character:·h
Result·value·=·104Create a c++ program that let the user input his/here grade on the following subjects: Programming, web application, oral communication, multimedia and physics and calculate the average.
Note: the program must also display/output the subjects will grades from the user and the average.
Write a program to perform basic to class conversion [Such as there is a class named: “conversion” with data members: feet and inches (both int)] Convert basic type(int) height in terms of total number of inches into equivalent feet and inches (class type) and display output on screen
6.10.
Write a program that takes data, a word at a time and reverses the words of the line.
Sample input/output dialogue: Input string value: birds and bees
Reversed: bees and birds
Write a Python program that asks the user to enter a series of 20 numbers. The program should store the numbers in a list. It should have the following functions:
The program should call the functions mentioned above and display the lowest, highest and total values in the list. It should also calculate and display the average of the numbers in the list
6.9.(Write a program using string functions)
Write a program that takes nouns and forms their plurals on the basis of these rules:
a. If a noun ends in “y”, remove the”y” and add “ies”
b. If a noun ends in "s”, “ch” or “sh”, add "es”
c. In all other cases, just add “s”