Home /UOS — University of Sargodha /Programming Fundamentals

Programming Fundamentals BS Software Engineering/MPhil Information Technology/MS Information Technology 1 Semester/Term UOS — University of Sargodha 2017

Programming Fundamentals BS Software Engineering/MPhil Information Technology/MS Information Technology 1 Semester/Term UOS — University of Sargodha 2017 — 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.

Need Paper? See all →

Need a paper or stuck on a question? Ask here — students reply and you get an email.

Ask about a paper
  • Ayesha Mustafa· 2 days ago

    BS ZOOLOGY first semester Animal diversity ZOOL 101 - university of Punjab 2025

    0 replies Reply →
  • Abubakar· 2 days ago

    Literary criticism

    1 reply Reply →
  • Guest· 3 days ago

    this paper consists of 60 marks but now we have 35 marks paper.

    1 reply Reply →
  • Annie· 3 days ago

    Can you please tell me more past papers please because my exams are starting from next week

    1 reply Reply →
  • Ahmed· 7 days ago

    Did you provide the past papers of the science of society uos?

    1 reply Reply →

More Programming Fundamentals papers

See all

Paper text

University of Sargodha

B.S 1" Term Examination 2017

Subject: Information Technology/Software Engineering

Paper: Programming Fundamentals (CMP:2122)

Time Allowed: 2:30 Hours

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

Objective Part

(Compulsory)

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

1. What is the purpose of detault statement in switch statement?

2. Why it is variable initialization?

3. Define EOF marker?

4. What is the purpose of file pointer?

5. What is built-in function? Give example.

6. What is Run-Time Error? Give example.

7. What is Dangling Pointer"

8.

Differentiate between Local and Formal parameters?

9. Which function is used to copy one string to another string?

10. What is pointer constant?

11. What is the drawback of Global variables?

12. What is the infinite loop.

Maximum Marks: 60

(2*12)

Subjective Part (4*9=36)

Note: Attempt any four questions. Ail 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 prints the sum 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?

Q5. Write down a program that counts total number of characters in a text file.

Q6. Write a program that declares a structure Student to store rollno(int), name(string) and

egpa(float). 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 down a program that prompts a 4-digit number from user and reverse it. For example if

user enters 2348 the program should print 8432.