Home /University Of Sargodha (UOS) /Programming Fundamentals

Subject: I.T/CS/SE Time Allowed: 02:30 Hours University of Sargodha ADP/BS 1º Semester Examination 2025

Subject: I.T/CS/SE Time Allowed: 02:30 Hours University of Sargodha ADP/BS 1º Semester Examination 2025 — page 1

Discussion

Ask a question about this paper, or help someone else with theirs. Answers are emailed to whoever asked.

Your email is only used to send you replies and occasional Ustadni updates. It is never shown publicly.

Log in to post under your name

No questions yet — be the first to ask.

More Programming Fundamentals papers

See all

Paper text

Subject: I.T/CS/SE

Time Allowed: 02:30 Hours

University of Sargodha

ADP/BS 1º Semester Examination 2025

Paper: Programming Fundamentals (CMPC-5201)

Maximum Marks: 40

Note: Objective part is compulsory. Attempt any three questions from subjective part.

Objective Part (Compulsory)

Q.1. Write short answers of the following in 2-3 lines each on your answer sheet.

i. What are the basic steps involved in problem-solving?

il. What is the role of a compiler and a linker in programming? How do they differ?

iii.

What are conditional statements? Give an example.

iv. How do repetitive statements (loops) work in programming? Provide an example.

V.

Explain the concept of multidimensional lists. How are they useful in programming?

vi.

What is modular programming? How does it help in software development?

vii. How do pointers and references work in C++? Provide a simple example.

vili. Differentiate between static and dynamic memory allocation with an example.

2*8)

Subjective Part (3*8)

Q.2.

Explain the Von-Neumann architecture. How does it influence modern programming?

0.3.

Write a program in Ct that takes two numbers as input and performs arithmetic, comparison, and

logical operations on them. Explain the code.

Q.4.

Discuss different types of loops used in programming. Write a program to print the first 10 even

numbers using a loop of your choice.

Q.5.

Explain the importance of function definition and calling in modular programming. Write a program

to demonstrate the use of functions in solving a real-world problem.

Q.6.

Discuss the concept of static and dynamic memory allocation. Write a Ct + program to demonstrate

dynamic memory allocation using pointers.

LK-6166/29-04-25