👁️ 67 views
University of Barishal Logo

University of Barishal

Department of Computer Science and Engineering

Final Exam

Course Title: Programming Fundamentals (CSE-1103)

Semester: 1st | Session: 23-24

Time: 180 minutes | Marks: 60.00

Course Teacher: Dr. Rahat Hossain Faisal

Exam Date: April 22, 2025

Answer any five Questions from the followings.

1.


a)

Define the following key term:

i. Source program

ii. Object program

iii. Executable program

iv. Syntax error

v. Linker error

vi. Execution/Run-time error

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Describe the general form of a simple C program that includes at least directives, functions and statements.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c) Discuss the problem-solving methodology with giving an appropriate C program as an example.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
2.


a)

Using an appropriate flow chart, explain step by step process of creating and running a C program.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Why C is often called a Middle-Level language? What do you understand by C tokens? Justify the necessity of using header files in C programs.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c)

Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program that prompts the user to enter a weight in pounds and height in inches and display the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254 meters.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
3.


a) What are different data types used in C? Explain.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Explain different types of IF statements used in C using appropriate statements and flow charts.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c) Considering all possible situations, write a C program to solve any Quadratic Equation.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
4.


a)

Suppose a man (say, A) stands at (0, 0) and waits for user to give him the direction and distance to go. User may enter N E W S for north, east, west, south, and any value for distance. When user enters 0 as direction, stop and print out the location where the man stopped.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

When is it better to use switch statement in a C program? Using switch statement, write a C program to calculate your grade of any course.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c)

Write a C program to display a Pyramid of stars of any height.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
5.


a)

Define array in C. What are the differences between while and do....while statements?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks
b) Write a C program to search a value within an array of elements.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c) Write a C program to sort n number of elements in ascending order.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
5 Marks
6.


a)

What are different advantages of modular programming approach? Mention important characteristics of modular programming.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

Explain different types of functions with an example of each.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c) Write a C program to calculate Standard Deviation of an array of values using function.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
7.


a)

Define a structure named Student which enclosed with data fields name, batch, id, incourse1 and incourse2. From keyboard, take input name, batch, id and marks of incourse1 and incourse2 for three students of Student type. Calculate total marks of incourse1 and incourse2 for each student. Print out the details of the student who got the lowest total incourse marks among three students.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b)

What are the benefits of using Pointers in a program? Mention important rules of pointer operations.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c)

Using function, write a C program to find the largest value among three values which are passed as arguments using the call by reference method.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
8.


a)

Why do we use file in C programming? What are different modes to open a FILE? Explain.

Mention and explain the purposes of any 10 (ten) commonly used C file-system functions.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
b) Write C program to convert Celsius temperature to Fahrenheit and store the value into a file.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
c)

Write a C program to append additional items to an existing file, "Inventory", stored in "d" drive and print the total contents of the file.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks

Contributors of this Question:

Role Name Date
Prepared By (Teacher): Dr. Rahat Hossain Faisal April 22, 2025
Uploaded By: Solaiman shikder April 22, 2025, 5:48 p.m.
Converted By (Img/PDF to Text): Baishakhi Bir Dec. 26, 2025, 8:43 p.m.
Reviewed By: Obaydul Hasan Nayeem Dec. 27, 2025, 8:29 a.m.