Skip to content

Structured Programming

ICE · Midterm · Fall 26

Section A

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 Information & Communication Engineering (ICE) Faculty of Engineering Mid-Term Exam, Semester: Fall 2026 Course Code: ICE 1143 Course Title: Structured Programming Section: A Course Teacher: Md. Taslim Arefin (TA) Time: 90 minutes Full Marks: 25 Answer any four of the following questions including question no 5. 1 a. State different properties of an Algorithm. 1 (CLO1, C1) b. Write a C program which will reverse a 4-digit integer. 3 (CLO3, C3) c. Illustrate a flowchart to check whether a number is divisible by 5 and 3 or 6. 2 (CLO1, C3) 2 a. Write a C program to read roll no and marks of three subjects and calculate the total, average and division. [Hint: 1st Division=80+, 2nd Division=70+, 3rd Division=60+, Pass=50+, Fail= less than 50.] 3 (CLO3, C3) b. Suppose you have three angles of a triangle. First check whether they form a valid triangle. If valid, classify it as acute-angled, right-angled, or obtuse-angled. Write a C program to solve the given conditions. 3 (CLO3, C3) 3 a. Determine the output of the following program 1 (CLO2, C3) void main(void) { int x=10, y=10, z; char b='B'; z = x!=4 || y == 2 && b=66; printf("z=%d\n", z); } b. A bank approves a loan only when the applicant satisfies all of the following conditions: 3 (CLO3, C3) • Age is between 21 and 65 inclusive. • Monthly salary is at least Tk 30,000. • Work experience is at least 2 years. • If the salary is at least Tk 100,000, experience of 1 year is sufficient, provided the age condition is satisfied. Write a C program to determine whether any loan will be approved or not. c. Illustrate a flowchart to determine a given year is leap year or not. 2 (CLO2, C3) 4 a. Determine the result of the following expression: 1 (CLO2, C3) int main() { int a=101; printf(" The value is: %c",a);} b. Determine the output of the following program: 2 (CLO2, C3) void main() { int a = 20, b = 30; if (a == b); printf("%d %d\n", a, b); printf("Have a nice day");} c. Write a C program to find the eligibility of Scholarship of a student of ICE department. [To avail a full scholarship your GPA must be 3.90 or above and family income is 30K or less. To avail a 75% scholarship your GPA must be 3.75 or above and family income is 50K or less. To get a 50% scholarship your GPA must be 3.50. Otherwise you are not eligible] 3 (CLO3, C4) 5 a. Determine the output of the following program: 2 (CLO2, C3) #include <stdio.h> int main() { int a = 10, b = 0; if(a > 0 && b < 0) a++; else if(a < 0 && b < 0) a--; else if(a < 0 && b > 0) b++; else b--; printf("%d\n",a + b); } b. Your goal is to create a futuristic café using automatic menu selection for the Lunch items. Write a C Program using switch case statement to solve it. 3 (CLO3, C4) c. Determine the output of the following program. 2 (CLO2, C3) void main() { int check=2; switch(check) { case 1: printf("D.W.Steyn"); case 2: printf(" M.G.Johnson"); case 3: printf(" Mashrafee Mortaza"); default: printf(" Tamim Iqbal"); getch(); }