Programming Fundamentals, Past Papers

Programming Fundamentals Past Paper 2019 – MSC IT (UOS)

Programming Fundamentals Past Paper 2019 MSc IT University of Sargodha

University: University of Sargodha (UOS)
Program: MSC IT – 1st Term
Subject: Programming Fundamentals (CMP-2122)
Year: 2019
Time Allowed: 2 Hours 30 Minutes
Maximum Marks: 80


Why Use This Programming Fundamentals Past Paper?

This past paper helps students understand programming basics, commonly repeated questions, and exam structure. It is useful for revision and conceptual clarity.

  • Understand core programming concepts
  • Practice short conceptual questions
  • Prepare logic-based programming problems
  • Improve problem-solving skills

Programming Fundamentals Past Paper 2019 (Complete)

Below is the complete text of the paper:

University of Sargodha
M.Sc. IT – 1st Term Examination 2019

Subject: IT
Paper: Programming Fundamentals (CMP-2122)
Time Allowed: 02:30 Hours
Maximum Marks: 80

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. (16×2)

  1. Differentiate between assembly languages and high-level languages.
  2. Define structured programming languages.
  3. Define algorithm.
  4. List the sub processes involved in program development.
  5. Discuss at least four data types of C/C++ with examples.
  6. Discuss input and output commands of C/C++ with examples.
  7. Discuss at least three selection control structures of C/C++ with examples.
  8. Differentiate between while and do-while loops.
  9. What does break statement do?
  10. What does continue statement do?
  11. What are the different types of user-defined functions available in C/C++?
  12. Differentiate between one-dimensional and two-dimensional arrays.
  13. What are pointers in C/C++?
  14. What are records in C/C++?
  15. How can files be handled in C/C++?
  16. What do you know about testing and debugging?

Subjective Part

Q.2 Given a string, count alphabetic letters and decimal digits.

Q.3 Find the number that occurs odd number of times in an array.

Q.4 Write a program to print all leaders in an array.

Q.5 Count number of words in a string.

Q.6 Write a program to find area of a triangle using Heron’s formula.


Solved Short Questions (Objective Section)

1. Difference between assembly and high-level languages

Assembly language is machine dependent and uses mnemonics, while high-level languages are machine independent and closer to human language.

Reference: GeeksforGeeks

2. Structured programming language

A structured programming language uses sequence, selection, and iteration constructs to improve code clarity and maintainability.

Reference: Encyclopedia Britannica

3. Algorithm

An algorithm is a finite set of well-defined steps used to solve a specific problem.

Reference: Khan Academy

4. Program development subprocesses

Problem analysis, algorithm design, coding, testing, debugging, and maintenance.

Reference: TutorialsPoint

5. Data types in C/C++

Common data types include int, float, char, and double, used to store different kinds of values.

Reference: cplusplus.com

6. Input and output commands

C uses scanf/printf, while C++ uses cin/cout for input and output operations.

Reference: GeeksforGeeks

7. Selection control structures

if, if-else, and switch statements are used for decision making in C/C++.

Reference: Programiz

8. While vs do-while loop

While loop checks condition first; do-while executes at least once before checking condition.

Reference: GeeksforGeeks

9. Break statement

Break immediately terminates the loop or switch statement.

Reference: cppreference

10. Continue statement

Continue skips the current iteration and moves to the next iteration of the loop.

Reference: cppreference

11. User-defined functions

User-defined functions can be categorized as functions with arguments and return values, without arguments, or without return values.

Reference: TutorialsPoint

12. One-dimensional vs two-dimensional arrays

One-dimensional arrays store linear data, while two-dimensional arrays store data in tabular form.

Reference: Programiz

13. Pointers

Pointers store the memory address of another variable and enable dynamic memory access.

Reference: GeeksforGeeks

14. Records

Records (structures) group variables of different data types under one name.

Reference: Programiz

15. File handling

File handling allows reading and writing data using file pointers such as fopen, fread, fwrite, and fclose.

Reference: GeeksforGeeks

16. Testing and debugging

Testing identifies errors, while debugging locates and fixes those errors in a program.

Reference: IBM


Download PDF

Download Programming Fundamentals Past Paper 2019 (PDF)


Related Past Papers


Frequently Asked Questions

Is this paper useful for exam preparation?
Yes, it helps understand real exam questions and marking patterns.

Is the PDF officially provided?
The paper is shared for educational and reference purposes.