Order PDF of any content from our website with a little minor Fee to donate for hard work. Online MCQs are fully free but PDF books are paid. For details: contact whatsapp +923028700085 Important notes based PDF Books are available in very little price, starting from 500/-PKR; Order Now: contact whatsapp +923028700085

VU Past Papers CS504 – Midterm Most important MCQs Solved

Q#1: According to coding style guide, how should abbreviations and acronyms be written when used as names?
(A) Always in uppercase
(B) Always in lowercase
(C) Should not be uppercase
(D) Written with numbers
Answer: (C) Should not be uppercase

Q#2: Which of the following is the correct example of abbreviation usage in coding style?
(A) exportHTMLSource()
(B) xportHTMLSource()
(C) exportHtmlSource()
(D) EXPORTHTMLSOURCE()
Answer: (C) exportHtmlSource()

Q#3: What is system downtime?
(A) Time when system runs faster
(B) Period when system works normally
(C) Period when developers fix the system to make it running again
(D) Time when system is upgraded
Answer: (C) Period when developers fix the system to make it running again

Q#4: Layered architecture consists of:
(A) One single layer
(B) Multiple layers
(C) Only hardware layer
(D) Only software layer
Answer: (B) Multiple layers

Q#5: In layered architecture, which layers are closer to machine hardware?
(A) Outer layers
(B) Middle layers
(C) Inner layers
(D) Interface layers
Answer: (C) Inner layers

Q#6: In layered architecture, outer layers communicate with inner layers through:
(A) Direct memory
(B) Interfaces
(C) Hardware ports
(D) Drivers
Answer: (B) Interfaces

Q#7: What is an infeasible path in a program?
(A) A path executed frequently
(B) A path executed only once
(C) A path never executed for any input data
(D) A path executed during debugging
Answer: (C) A path never executed for any input data

Q#8: Which testing technique includes coverage schemes?
(A) Black box testing
(B) White box testing
(C) Integration testing
(D) System testing
Answer: (B) White box testing

Q#9: In object oriented naming conventions, names representing types should be:
(A) Verbs
(B) Adjectives
(C) Nouns written in mixed case starting with uppercase
(D) Numbers
Answer: (C) Nouns written in mixed case starting with uppercase

Q#10: Variable names should start with:
(A) Uppercase letter
(B) Lowercase letter
(C) Number
(D) Symbol
Answer: (B) Lowercase letter

Q#11: How should constants be written according to naming conventions?
(A) Lowercase letters
(B) Mixed case
(C) Uppercase with underscore
(D) Numbers only
Answer: (C) Uppercase with underscore

Q#12: Method and function names should generally be:
(A) Nouns
(B) Verbs
(C) Adjectives
(D) Symbols
Answer: (B) Verbs

Q#13: Template types in C++ should be represented by:
(A) Lowercase letters
(B) Single uppercase letter
(C) Numbers
(D) Mixed symbols
Answer: (B) Single uppercase letter

Q#14: Private class variables should have which suffix?
(A) #
(B) @
(C) _
(D) $
Answer: (C) _

Q#15: According to naming conventions, all names in code should be written in:
(A) Urdu
(B) English
(C) French
(D) Any language
Answer: (B) English

Q#16: What is the main objective of software testing?
(A) To prove software has no errors
(B) To expose defects in software
(C) To increase program size
(D) To remove documentation
Answer: (B) To expose defects in software

Q#17: A test is considered successful when:
(A) It runs without errors
(B) It discovers an error
(C) It compiles successfully
(D) It increases speed
Answer: (B) It discovers an error

Q#18: Equivalence classes are used to:
(A) Increase memory
(B) Divide problem domain into classes for testing
(C) Delete bugs
(D) Write documentation
Answer: (B) Divide problem domain into classes for testing

Q#19: Debugging is considered:
(A) Only an art
(B) Only a science
(C) Both art and science
(D) Neither art nor science
Answer: (C) Both art and science

Q#20: Which error occurs when a program repeatedly displays the same message or data?
(A) Logical error
(B) Loop error
(C) Syntax error
(D) Pointer error
Answer: (B) Loop error

Contents Copyrights Reserved By T4Tutorials