Programming Fundamentals BS 1 Semester/Term 2016
Discussion
Ask a question about this paper, or help someone else with theirs. Answers are emailed to whoever asked.
No questions yet — be the first to ask.
Need a paper or stuck on a question? Ask here — students reply and you get an email.
Ask about a paper-
BS ZOOLOGY first semester Animal diversity ZOOL 101 - university of Punjab 2025
0 replies Reply → -
Literary criticism
1 reply Reply → -
this paper consists of 60 marks but now we have 35 marks paper.
1 reply Reply → -
Can you please tell me more past papers please because my exams are starting from next week
1 reply Reply → -
Did you provide the past papers of the science of society uos?
1 reply Reply →
More Programming Fundamentals papers
See all
Programming Fundamentals BS Software Engineering/MPhil Information Technology/MS Information Technology 1 Semester/Term UOS — University of Sargodha 2017
Uploaded 8 hours ago · by Hifza
Download ↓
Programming Fundamentals BS/MPhil Computer Science/MS Computer Science 1 Semester/Term UOS — University of Sargodha 2016
Uploaded 8 hours ago · by Hifza
Download ↓
Programming Fundamentals M.Sc. 1st Term 1 Semester/Term UOS — University of Sargodha 2019
Uploaded 9 hours ago · by Hifza
Download ↓
Programming Fundamentals BSCS 1 Semester/Term UO — University of Okara 2026
Uploaded 3 days ago
Download ↓
Programming Fundamentals M.Sc. 1 Semester/Term UOS — University of Sargodha 2019
Uploaded 3 days ago · by Mudassir
Download ↓
Programming Fundamentals BS 1 Semester/Term UOS — University of Sargodha 2023
Uploaded 2 months ago
Download ↓
Paper text
BS 1" Term Examination 2016
Paper: Programming Fundamentals (CMP-2122)
Subject: I. T
Time Allowed: 2:30 Hours
Maximum Marks: 6
Objective Part Compulsory (12*2=24)
Note: Attempt all questions. All question carry equal marks.
1. Why break statement is used in switch statement?
2. Why it is important to close a file. How is it closed?
What is the scope of Local Variable?
What is meant by Case Sensitivity in C language?
What is built-in function? Give example.
6. What is Logical Error and how it can be detected?
7. What is the purpose of goto statement and why it is not preferable?
8. Differentiate between function prototype and function definition?
9.
Which function is used to find the length of a string?
10. Define recursive function?
11. What is Dangling Memory?
12. What is the difference between pre-increment and post-increment.
Subjective Part (4*9=36)
Note: Attempt any four questions. All questions carry equal marks.
Q2. Write down a program that reads 10 elements in an array from user. Pass the array to a method
that finds and print the largest number of given numbers.
Q3. Write down a program that accepts an integer number from user. Calculate and display its
factorial by using a recursive function.
Q4. Write down a C program that prints the following pattern?
4
4
4
3
3 -
2
QS.
a) Write down a routine that reads contents of a file and print these contents on screen.
b) Write down a method that swaps two values passed by reference.
Q6. Write a program that declares a structure Book to store bookno(int), name(string) and
authorname(string). The program defines an array to store record of five students. It inputs five
students and then display the record of each student.
Q7. Write a function Is Prime that has an input parameter num and returns a value of 1 if it is
prime. Otherwise it returns the value of 0.