CS201 Midterm File by ZB
CS201 Midterm File by ZB
CS201
MCQS Midterm preparation file ZB
ZB
MCQS
a) Manage hardware
b) Manage software
c) Manage memory
a) 101101
b) 1000
c) 101010
b) Store data
d) Manage memory
a) integer
b) float
c) char
a) RAM
b) ROM
c) Cache memory
d) Register memory
Answer: b) ROM
a) C
b) Java
c) Assembly
d) Fortran
Answer: d) Fortran
a) RAM
b) Hard Drive
c) CPU
d) Cache
a) &
ZB
b) &&
c) |
d) ||
Answer: b) &&
a) Running a program
c) Debugging code
a) ALU
b) Register
c) Memory
d) Cache
Answer: c) Memory
a) 1variable
b) var_name
c) @var
d) variable name
Answer: b) var_name
MCQS Midterm preparation file
ZB
ZB
13. Which of these is an example of a high-level programming language?
a) Assembly
b) Machine language
c) Python
d) Binary code
Answer: c) Python
a) int main()
b) void main()
c) int main(void)
17. Which of the following is the correct syntax for a for loop in C?
ZB
b) for (i=0; i<10; i+=2)
a) ? :
b) & :
c) ->
d) ++
Answer: a) ? :
a) Display output
b) Read input
c) Store output
b) A type of loop
a) int ptr;
b) int ptr;
c) int ptr;
d) ptr int;
a) exception handling
b) try-catch block
c) error() function
a) while
b) do-while
c) for
ZB
Midterm preparation file
29. What does the 'break' statement do in C?
b) Skip the current iteration and proceed with the next iteration
Answer: b) Skip the current iteration and proceed with the next iteration
a) Encapsulation
b) Abstraction
c) Inheritance
d) Sequential processing
ZB
Midterm preparation file
ZB
MCQS
Midterm preparation file
37. Which of the following is the default access modifier for members of a class in C++?
a) private
b) public
c) protected
Answer: a) private
a) private
b) protected
c) public
d) confidential
Answer: d) confidential
ZB
MCQS
Midterm preparation file
41. Which of the following is an example of a constant in C?
a) #define PI 3.14
b) const int x = 5;
c) Both a and b
c) It refers to a function
a) try-catch block
b) exception keyword
c) assert function
a) MyClass() {}
b) MyClass(void) {}
c) MyClass(int a) {}
46. Which of the following data types is used for storing decimal values in C?
a) int
b) float
c) char
d) bool
Answer: b) float
ZB
Passing Criteria for a Course:
ZB
MCQS Midterm preparation file
ZB
Advice
Hmaesha relax ho ke parha kryn panic mat hua kryn apky
parents ky bohat khawab hoty hn wo pura krny ki puri koshish
kea kryn kbi b ksi pe depend na kea kryn apko bs ak insan
success kr saqta ha or wo insan ap khud hn apky elawa koi nahe
ap bs koshish kryn Allah pak pe strong yakeen rakha kryn or
mehnat krke sb Allah ke hawaly kr dea kryn everything is
possible be brave be strong stay blessed
Hum insan hamesha moat se darty or bhagty hn or moat se
bachny ki koshish krty hn jabke moat ny ana hi ana ha hum
ZB
moat se nahe bach saqty humy jahanam se bachny ki koshish
krni chaheay hum jahanam se bach saqty hn
Insan ko 3 chezo se dar lagta ha Moat Risk/Dolat Ezat Shohrat
Fame
Moat
Humy pta hona chaheay Moat tab ani ha jab Allah
chahy us se pehly puri dunya bi ak tararf ho ke apko
marna chahy to apka kuch nahe beggar saqti
Risk/Dolat
Risk Dolat sb Allah pak ke hath m ha puri dunya ak
taraf b ho jay na apsy apka risk cheen saqti ha na de
saqti ha Ye sirf ALLAh pak ky hath m ha
ZB
Agr ap mujsy contact na kr sky too b ap jo b hn jaha bi hn waha
Allah ka quran pheelay zada se zada with urdu translation jitni
himat ha utna share kryn
ZB
MY Family
ust Relax and focus! Exams are not difficult. Put in your
100% effort and trust in Allah.
AL-Quran