BS 1 Semester/Term 2022
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.
Paper text
University of Sareodha
BS.1° Tenn Csmieation 2022
Sebied: Softmare Engiecering/11 CS.
Caper Prezamminz Eradamcassh (CMPC-10D)
Stasinom Marks: 40
Time Allowed: 02:30 Hours
Note Objective part is compubery, Attempt any three questions froms sabjective part.
hicclive Part
(Compubery)
Write short aowers of the following in 2-3 linci sach on your answer sheet.
(2*8)
Write the name of two low priority logical operors.
spe of associativity of operators is ved?
s in C language that shows implicit type casting.
Consider following declaration statement.
pir, var"
Is following statements vallu? Give reasonine
vil
What is scope and life time of a local variable?
Considering following declaration
Dos vie = 5:
Is following simement true lase? trive feason
What is the output?
for (int i - 3; > 11-1-13
0.2.
Q3.
0.4.
0.5.
(3"8)
Write a pogramn that scoopts an aeger Value from
er in an array and passes it to a function The
function finds the sum of all factors of that number and returns it to main where the result is displayed
example 15 has four factors i.e. 1. 3, 5,
15. The sum of the factors is 1 + 3 + 5 - 15 - 24
Write a program that declares a structure student with data members name (array of characters) and
cepa (loat). Create three variables of sodent, accept valves frous keyboard and display same of the
student socuring egpa less than average egpa of the given students.
Write a program that accepts an array of integers from user and passes the array and its size to a
function. The function finds the sum of all values divisible by 5 and returns it to maint), where the
result is displayed.
Write only the output of the following program in its correct format.
void maint
stadni
j-j-1:
ustadni.com
0.6.
Write a program that accepts a string from user and pass it to a user-defined function named reverse.
The function reverses the string which is displayed by main.
For Example: Input String is ABCDEF.
Reversed String will be FEDBA.
Note: Do not use any built-in function to reverse string
ustadni.com