Q 1 (a) Write a program to input a temperature reading ...
[pic] COMPUTER PROGRAMMING
MIDTERM EXAM 2K7-TELECOM
SUBJECTIVE PORTION
Instructor: Engr. Mariam Shafqat
MAXIMUM MARKS 30 TIME ALLOWED 1:30 min
NOTE: All the questions are compulsory.
Use same question number on answer sheet as on question paper
Display at least one output of all the programs.
Q 1 (a) Write a program to input a temperature reading expressed in Fahrenheit and output its equivalent in Celsius using formula C=5/9(F-32) where
F=temperature in Fahrenheit (entered by user)
C=temperature in Celsius (Calculated in program) (2.5)
(b) Write a program to implement bubble sort algorithm in an array of 10 elements. (2.5)
Q 2 ( a) Calculate all multiples of 5 within the range of 1 to 100. (2.5)
(b) Write output of following chunks (2.5)
(What's wrong in this chunk? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
(What's wrong in this chunk? while( (i < 10) && (i > 24))
(What's wrong in this chunk? for (int k = 2, k 9)
num = num + 2;
cout ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
Related searches
- write a letter to the future me
- write a column to csv using pandas
- write a letter to a friend abcya
- add a program to startup list
- add a program to startup windows 10
- write a thematic statement in a reading
- write a letter to a soldier
- write a letter to yourself
- write a letter to print for free
- write a letter to myself
- write a file to csv python
- powershell write a variable to a file