Programming Fundamentals BS 1 Semester/Term University Of Sargodha (UOS) 2015
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.
More Programming Fundamentals papers
See all
Programming Fundamentals (CMPC-5201) I.T/CS/SE University of Sargodha - ADP/BS 1' Semester Examination 2025
Uploaded 9 months ago
Download ↓
Programming Fundamentals ADP/BS 1 Semester/Term PU — University of the Punjab 2025
Uploaded 10 months ago
Download ↓
Programming Fundamentals ADP 2 Semester/Term University Of Sargodha (UOS) 2024
Uploaded 1 year ago
Download ↓
Programming Fundamentals BS 1 Semester/Term University Of Sargodha (UOS) 2024
Uploaded 1 year ago
Download ↓
Programming Fundamentals MPhil Information Technology/MS Information Technology/MSc Information Technology 1 Semester/Term University Of Sargodha (UOS) 2017
Uploaded 1 year ago
Download ↓
Programming Fundamentals BS/MS Software Engineering/PhD Software Engineering 1 Semester/Term University Of Sargodha (UOS) 2023
Uploaded 1 year ago
Download ↓
Paper text
1
ustadni.com
University of Sargodbe
BS 1" Term Examinat a 3015
Sobiece Softrare Engineerinx
Time Allowed: 2:30 Hours
100
Ohickite Patt
Comesion
Note: Attempt all questions cach question carry squal marka?
What is a variable? How to declare a legal variable in C program.
H.
What is the difference between bigh level and machine level language
Differentiate for and while loog?
How many main O functions are define jo» C program, junity your aca
VL
Evaluate the expression y - 6/2•2+345 + 7:
If x is a variable in C then what is difference b/w 1h817x
What issyntaserror?
vill
Difference bw Prototype and definition of a function.
Why break statement is used in switch structure?
xE.
sil.
Why a programmer une fopen and felose function in C program?
What is the structure?Define syntax of structure.
What is a pointer? Write an cxample of initialization of a pointer?
Maximum Marka: 40
(2*12-24)
Subjective: (40936
Note: Attempt any four questions.
Q
2. Write a program to calculate the net pay of an employee, Input the basic pay, pass the
basicpay to the user defines function paycalculate
0. calculate the net pay and return to
main function. Calculate the net pay of an employee:
• House rent is 43% of the basic.
• Medical allowance is 31 of basic joy if basic pay is greater than Rs.7000. 1 is 9%
basic pay if the batic pay is less or equal than R$ 7000"
Conveyance allowance is Rs.96%
If basic pay is less than or equat R.
Rs. 193%if the basic pay is more than Rs.7l
Niet pay it caleulated by adding baste pay, medical allowance, coas
and bouse rent.
Q
3. Write a program that displays the following output using nestedloop.
ustachi.com
Q
4. Assuming that a text file named FIRST.txt contains some text written into it, write a
function named copyupper
0. that reads the file FIRST.txt and create a new file named
SECOND.txt contains all words from the file FIRST.tst in uppercase (Hint toupper function
converts the lowercase letter in C to the corresponding uppercase letter).
form the array than Swap the Maximum cement with last element of array. Display array
before and after the swapping.
StadmiT©s Write a program that takes 10 elements of amy from the user. Find Maximum elevens
ustadios. wise a program that takes 16 elements of aray fom the uner. Find Masieum element.
© 6.Write a program that accepts an integer number from the user. Calculate and display is
factorial by using a recursive function.
Q
7. Write a C program that creates a structure Comples which represents fields by integers real
numbers This program alastates the sum of two couples nabers which will beeneed by t@@fil.com
and imaginary. Program allows the user to enter the real and imaginary parts of two complex
the user. Program will add real parts and imaginary parts of complex numbers and prints the?
sum of complex number on the screen.
Sohail Nawaz
ustadni.com