Beruflich Dokumente
Kultur Dokumente
Instructions
1.Last date for submitting case studies is 05-01-15
2.Code, debug, comment, and print the source code for all programs. All
programs must contain your name, date and code comments. Points will be
deducted on programs that are not well coded and commented pages that
are unstapled.
3.Execute programs three times with different input.
4.Print the output from all executions (use ALT PrintScreen to capture the
output window and then paste into Wordpad or MS Word).
5.Include a program message explaining the objective of the program to
the user.
6.for documentation write aim,problemstatement,algorithmand results
7.one softcopy should be submitted to srujanainturi@cbit.ac.in mail-id
8.hardcopy to be submitted personally on or before 05-01-15
defined as
F (M, N) = 1 if M=0 or
AND F (M, N) =F (M-1, N) + F(M-1,N-1)
2.Write a menu driven program to read a string, display the string, merge
two strings, copy n characters from the mth position, calculate the length of
the string.
3.Write a program to define a structure for a hotel that has members- name,
address, grade, number of rooms, and room charges. Write a function to
print the names of a hotel in a particular grade. Also write a function to print
names of a hotel that have room charges less then the specified value.
Positive
Positive
Negative
Positive
Negative
Negative
Positive
Negative
2.If index function is given as- INDEX( text, pattern), then find the index(T,P)
where T=Welcome to world of c programming.
3.Write a program to create a structure with information given below. Then
read and print the data.
Employee[10]
a) Emp_Id
b) Name
i. First name
ii.
Middle name
iii.
Last name
c) Address
i. Area
ii.
City
iii.
State
d) Age
e) Salary
f) Designation
Hint: Construct a loop. Terminate the loop when a zero rate is encountered. At the end of
the loop, print out the total pay. The code for computing the pay from the rate and hours
is to be written as a function.
76.00 pounds
Output
-------------------------------------------------1 2 3 4 5
Nothing bad
However, if 7 were the highest number, the user would see the results on
the right for the following number entries:
Input sequence
----------------------1 3 2 4 5
Output
---------------------Missing 6
Missing 7
And if 10 were the highest number and the user entered the numbers
shown on the left, note the list of missing and duplicate numbers:
Input sequence
-----------------------------------------1 2 4 7 4 4 5 10 8 2 6
times)
Output
---------------------Duplicate 2 (2
Missing 3
Duplicate 4
(3 times)
Missing 9
The program should check the highest number that the user inputs to
ensure that it does not exceed the size of any array you might be using
for storage.