Skip to content

Computer Fundamentals

CSE · Final · Summer 21

Section ALL

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of Computer Science and Engineering Faculty of Science & Information Technology Final Examination, Summer 2021 @ DIU Blended Learning Center Course Code: CSE112, Course Title: Computer Fundamental Level: 1 Term: 1 Section: ALL Marks: 40, Modality: Open Book Exam Date: Thursday, September 2, 2021. Time: 09:00 AM-12:30 PM 1. (a) Write an algorithm for finding the sum, subtract, product and average of five inputting numbers. 5 (b) Mr. Akbar Ali has bought three jackfruits of different weights (kg) from the market. Now draw a flowchart for finding the jackfruit of the maximum weight. 5 2. Find the output of the following C programs and justify your answer with necessary explanation. Also identify all the program segments with their purposes. 2.5 x 4 = 10 (a) // program a #include <stdio.h> void main() { float age, AgeInSeconds; printf("Enter your age:"); scanf("%f", &age); AgeInSeconds = 365 * 24 * 60 * 60 * age; printf("You have lived for %f seconds", AgeInSeconds); } (b) #include <stdio.h> int main() { int k = 14, l = 12; if (l >= k) { l = k; k = l; printf("%d, %d\n", k, l); } return 0; } (c) #include <stdio.h> int main() { int i; for(i=1; -1; i++) printf("%c ",i); return 0; } (d) #include <stdio.h> int main() { int i; for(i=5; i<=20;i++); printf("i=%d\n",i); return 0; } 3. (a) Write a complete C program that finds real roots of a quadratic equation. 5 (b) Identify each of the identifiers of the program that you have written in 3(a) with reason. 5 4. (a) International University maintains a unified grading system available in Table1 for their students result processing. Prepare a program in C programming language for result calculation of the 10 students in a class for finding the grades of all courses taken in a semester. 5 (b) Write the syntax, flow-diagram and purpose of the selection control structure that is used in the C program written for 4(a). 5 Table 1: Unified Grading System Numerical Grade | Letter Grade | Grade Point 80 – 100 | A+ | 4.00 75 – 79 | A | 3.75 70 – 74 | A- | 3.50 65 – 69 | B+ | 3.25 60 – 64 | B | 3.00 55 – 59 | B- | 2.75 50 – 54 | C+ | 2.50 45 – 49 | C | 2.25 40 – 44 | D | 2.00 Less than 40 | F | 0.00