CS502 Quiz 1 BY MCS of Virtuallians.pdf

Verified academic study resource for CS502 (Fundamentals of Algorithms) under the Computer Science at Virtual University of Pakistan. This PDF document (Live Quiz Dumps & Solved Objective Bank) covers Quizzes & Objective Exam Scope spanning approximately 180 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS502 – Fundamentals of Algorithms
Faculty
Computer Science
Format
PDF
Type
Quiz
Coverage
Quizzes & Objective Exam Scope

Quiz questions often repeat with modified parameter values in both Midterm and Final exams. Practice with our 45-second timed simulator to master exam pacing.

What this file covers — CS502 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS502 Quiz 1 BY MCS of Virtuallians.pdf for free?

You can preview and download "CS502 Quiz 1 BY MCS of Virtuallians.pdf" (CS502 PDF, ~180 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs502-quiz-1-by-mcs-of-virtuallians-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS502 file?

This document covers Quizzes & Objective Exam Scope across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS502 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS502 solved past papers and handouts verified for 2026 exams?

Yes. All CS502 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

              CS502 – Fundamental of Algorithms
                    Quiz # 1 January 2021
               Prepared By: MCS of Virtuallians
        If found any error please correct it accordingly
1. DFS or BFS yields a ________ of the graph.
      a. Traversed Tree
      b. Spanning tree                  page 125
      c. Simple Tree
      d. Free Tree
2. In Knapsack Problem, the goal is to put items in the knapsack such that the
   value of the items is _________ subject to weight limit of knapsack.
      a. Minimized
      b. Decreased
      c. Maximized               page 91
      d. None of the given options
3. Using ASCII code, each character is represented by a fixed-length code of
   _________ bits per character.
      a. 4
      b. 6
      c. 8                 page 99
      d. 10
4. Which type of algorithm is harder to prove the correctness?
      a. Greedy           google
      b. Brute Force
      c. Dynamic Programming
      d. Divide and Conquer
5. Consider the string "abcdaacac". if the string is coded with ASCII codes, the
   message length would be ____________________.
      a. 70 bits
      b. 60 bits
      c. 90 bits
      d. 75 bits          8*9=72 bits is the right answer
6. In _________ algorithm, you hope that by choosing a local optimum at each
   step, you will end up at a global optimum.
      a. Simple
      b. Divide and conquer
      c. Greedy                   page 97
      d. Brute force

7. For a digraph G = (V, E), Sum of in-degree(v) ________________
       a. Not equal to Sum of out-degree(V)
       b. = Sum of out-degree(v)                 page 115
       c. < Sum of out-degree(v)
       d. > Sum of out-degree(v)
8. In inductive approach of knapsack problem, we consider 2 cases, _______
   Or _______.
       a. Median, Mode
       b. Recursive, Iterative
       c. Leave object, Take object                 page 93
       d. Sequentially, Parallel
9. A/an _________ is one in which you want to find, not just a solution, but the
   best solution.
       a. Optimization Problem                      page 97
       b. Divide and Conquer
       c. NP Complete problem
       d. Best Problem
10.If the graph is represented using an adjacency matrix, then Breadth-first
   search takes ________ time.
       a. O(E+1)
       b. O(V^2)               page 125
       c. O(V)
       d. O(E)
11.If the graph is represented using an adjacency list, then Breadth-first
   search takes ________ time.
       a. O(V^2)
       b. O(V)
       c. O(V + E)               google
       d. O(E + 1)
12.A graph is ________ if every vertex can reach every other vertex
       a. Connected                page 116
       b. Cycle
       c. Acyclic
       d. Loop
13.The number of edges that come out of a vertex is called the ________ of that
   vertex in a digraph.
       a. post-degree
       b. in-degree
       c. out-degree                  page 114
       d. pre-degree

14.Huffman algorithm produces the _________ prefix code tree
      a. Optimal                   page 105
      b. Best
      c. Worst
      d. Better
15.A graph is said to be acyclic if it contains _____________
      a. at least one cycle
      b. exactly one cycle
      c. always more than one cycle
      d. no cycles                page 116
16.Fractional Knapsack is founded on __________ method.
      a. Greedy
      b. Recursive
      c. Dynamic Programming                   google and page 93
      d. Divide and Conquer
17.If Matrix-A has dimensions "3x2" and Matrix-B has dimensions "2x3", then
   multiplication of Matrix-A and Matrix-B will result a new Matrix-C having
   dimensions
      a. 3x2
      b. 2x3
      c. 2x2
      d. 3x3
18.Some places a person wants to visit Starting from a vertex, he wants to visit
   every place linked to this vertex, and so on. What algorithm does he need to
   use?
      a. Depth First Search
      b. Breadth First Search                  page 118
      c. Greedy Algorithm
      d. Divide and Conquer
19.A Greedy algorithm can NOT be used to solve all the _______ problems.
      a. Dynamic programming                         google
      b. Memorization programming
      c. Edit distance programming
      d. Storing value programing
20.In Huffman encoding, the _____ is the number of occurrences of a character
   divided by the total characters in the message.
      a. Counting
      b. Parsing
      c. Relative Probability                        page 100
      d. Weight

21.In Brute Force solution of knapsack Problem, there are ______ possible
   combinations for n items.
      a. 2
      b. n
      c. 2^n (2 raise to the power n)               Page 92
      d. 3^n (3 raise to the power n)
22.The Binary Tree constructed by Huffman Encoding is a:
      a. Full binary tree                  page 102
      b. Partial binary tree
      c. Incomplete binary tree
      d. None of the given options
23.In Huffman encoding when a new node is created by combining two nodes,
   the new node is placed in the _________.
      a. Priority queue                   page 100
      b. Linked list
      c. Min heap tree
      d. Graph traversal
24. Find the maximum value of the items which can carry using knapsack
   weight capacity = 50.
       Item Weight Value
         1       10       70
         2       20       20
         3       30       80
         4       70      200
      a. 280
      b. 100        30+20=50, so v=100
      c. 90
      d. 200
25.In general, the Activity Selection Problem is to select a ___________.
      a. Minimum-size set of interfering activities
      b. Maximum-size set of mutually non-interfering activities
          page 105
      c. Maximum-size set of interfering activities
      d. Minimum-size set of mutually non-interfering activities
26.In Activity selection problem, intuitively _______.
      a. There are always short activities as input
      b. Short activities are not attractive
      c. Duration of the activities does not matter
      d. We do not like long activities               page 105

27.Which of the following ways can be used to represent a graph?
       a. Adjacency List

More CS502 files

All CS502 files · Midterm Prep 2026 · MCQs Bank