Computer Science CSS Paper 2000-2022
Computer Science CSS Paper 2000-2022
SECTION – A
1. (a) Illustrate the basic computer architecture and define the functions of its main components.
[10]
(b) Describe in detail the memory types used in computers. How data and instructions are
communicated to and from the computer memory. [10]
2. (a) Define the operating system and its function. List different operating systems
available in the market. [10]
(b) Why scheduling is necessary in operating system? Briefly describe various
scheduling policies. [10]
3. (a) Illustrate a simple LAN model showing major LAN components and their functions.
What types of changes need to be made in such a model if the speed of data
communication is to be increased? [10]
(b) Describe ISO reference model. Explain at which layers, the TCP/IP works. [10]
SECTION – B
1. Write a simple program in C/C++ to calculate the marks of each student appearing in this paper.
The marks must be identified for each section (A, B,…), question (1,2,…) and part of the
question (a, b, etc.). The program must calculate the total marks obtained subject to following
conditions. [20]
2. Only five questions are attempted. Student must attempt compulsory question and at least one
question from each section. Marks of one question will not be counted if no question is
attempted from any one section.
3. Al questions carry equal (20) marks each. All marks are equally divided in question parts (a, b,
c,…etc.).
4. There is no negative marking. Student must not get more than maximum marks allotted to the
question attempted.
5. (a) Describe the difference between a queue and a stack. How these are handled in a
C/C++ program. Describe various situations in which you will use stack instead of
queue. [10]
(b) Briefly contrast various Software Department Life Cycle models and discuss their
effectiveness in appropriate situations. [10]
SECTION – C
1. (a) Define a data model. Describe various sets of information this model provides. Critically
examine, which information (with respect to program development) is not described by the data
model alone. [10]
(b) A Relational Model is commonly used database model. What are essential characteristics of
the Relation Model? And why do we use nomalisation? [10]
2. (a) Briefly contrast the uses of HTML, CGI, PERL, JAVA Applets in web page design.
Where and when will you prefer to use these?
(b) What is meant by windowing and clipping operations? Describe the clipping
techniques with examples. [10]
4. Application program instructions are loaded in the main memory just before execution.
(True/False)
7. The Basic difference between WAN and LAN is speed of data communication and not
the size of data. (True/False)
9. Tree structure will have more paths with the large size of same data. (True/False)
10. Object-oriented Methods use data and process (on the data) defined as a single entity.
(True/False)
11. E-R model also defines the minimum and maximum values in each relationship of data
entities. (True/False)
13. Scanning is a process to convert hard copy of the computer files. (True/False)
(B) Please choose the most appropriate answer from the given set of answers to fill the
blanks.
4. When the LAN is arranged in such a way that each computer is connected directly to
the HUB the configuration can be termed as _____________ network.
a. Bus b. Star c. Ring d. None of these
5. To communicate with other computers over a telephone line the computer must have
_____________ installed.
a. Telephone set b. Modem c. LAN Card d. None of these
6. When each item of data in a database is directly linked with every other item of data,
the database is called _____________.
a. Relational b. Hierarchical c. Network d. None of these
1. (a) Draw the block diagram of a digital computer. Describe the functions of its various parts.
(b) What is a Computer Bus? Name and briefly explain the functions of important Computer Buses.
2. (a) What does Network protocols mean? Name Two main categories of network
protocols. Explain and give examples of each.
(b) What is the OSI model? How many layers does it consist of? Name these layers
along with their brief functionality.
3. (a) What are the five major activities of an operating system in regard to process
management?
(b) Briefly describe the three major activities of an operating system in regard to
secondary storage management.
SECTION – B
1. (a) Write down the syntax and flow char of if/else operation. Also explain its functions.
(i) Are there any Syntax errors in the code? If so where are they?
(ii) Assuming any Syntax errors corrected, when will y be decremented?
(iii) Assuming any Syntax errors corrected, when will x be incremented?
1. (a) Name the models that can be used in Software engineering. Explain any one model in detail.
(b) Differentiate between a Stack and a Queue. How are these handled in C++? Describe various
situations where stacks are preferred over queues.
SECTION – C
1. What is normalization? Briefly explain 1st, 2nd and 3rd normal forms using any Database example.
2. (a) Define the term “Computer Animation”. Briefly explain the design of animation
sequences.
(b) What is clipping? Why is it used in computer graphics? Name 5 primitive types of
clipping. Briefly explain any two types.
COMPULSORY QUESTION
1. (A) Write only True or False in the Answer Book. Do not reproduce the questions.
(1) Detecting and recovering errors in data communication is called flow control.
(2) Shareware softwares are used to share data between two computers.
(3) Computer programs that are used to detect and remove viruses from the computer
system are called anti-virus programs.
(4) The processor directive “include” is used to define a constant quantity.
(5) Incremental backup means the entire backup of the data from the hard disk of the
computer.
(6) Wide Area Networks are limited to one office building.
(7) Secondary storage is another name for RAM.
(8) LPT2 represents the second parallel port.
(9) A Spool Folder is a temporary storage areas of print jobs.
(10) A Webmaster is a person who maintains the website of an organization.
1. (a) Differentiate between CISC and RISC computer architectures and in this context, describe the
architectures of a Stack Machine?
(b) Define a process and process control block. Draw a 5-state model for the process state transition and
explain it.
2. (a) Define a parallel computer and describe the Flynn’s Taxonomy to characterize the
various parallel computer architectures.
(b) Differentiate between the paging and segmentation. And describe the working of
Page-Fault Frequency Algorithm.
3. (a) Describe the TCP/IP and explain the concept of TCP/IP ports. Also describe the
functionality of at least two well-known protocol ports.
(b) What is the OSI model? Name various OSI layers and briefly describe their
functionality.
SECTION – B
1. (a) Write an algorithm to construct the binary tree with given preorder and inorder sequence? Prove that
every binary tree is uniquely defined by its preorder and inorder sequence?
(b) Provide five examples of software development projects that would be amenable to prototyping,
name two or three applications that would be more difficult to prototype?
2. (a) Briefly construct various Software Development Life Cycle models and their
effectiveness in appropriate situations.
(b) Write notes on:
(i) Parameter Passing in C++
(ii) C++ operator associations and order of precedence
(iii) C++ structures and classes
SECTION – C
1. (a) Describe the Bresenham’s Line algorithm for raster devices and implement it in C++
(b) Differentiate between DDL, DML, DCL and give examples.
2. (a) Consider the following relations and identify the highest normal form of each as
given, stating any assumption that you need to make.
1) WORK 1 (EMPID, EMPNAME, DATE, HIRED, JOB_TITLE, JOB_LEVEL)
2) WORK 2 (EMPID, EMPNAME, JOB_TITLE, RATING_DATE, RATER_NAME,
RATING)
3) WORK 3 (EMPID, EMPNAME, PROJECT#, PROJECT_NAME, PROJ_BUDJET,
EMP_MANAGER, HOURS_ASSIGNED)
4) WORK 4 (EMPID, EMPNAME, SCHOOL_ATTEND, DEGREE,
GRADUATION_DATE)
5) WORK 5 (EMPID, EMPNAME, SOCIAL_SECURITY_NUMBER,
DEPENDENT_NAME, DEPENDENT_ADDRESS, RELATION_TO_EMP)
(b) What are scripting languages? Display the user name and password of the user
using Perl on the same page, using both Get and Post form?
COMPULSORY QUESTION
1. (A) Write only True or False in the Answer Book. Do not reproduce the questions.
(1) The terms “type cast” and “type conversion” have different semantics i.e. they have
different effects on the program execution.
(2) Alignment restrictions of modern RISC-architectures forces compilers to occasionally
introduce “holes” and “padding” for record structures to ensure efficient access of record
elements.
(3) In a language with garbage collection, the programmer need not worry about heap
memory management.
(4) In order to execute a program by interpretive execution, the interpreter needs to
execute on the system on which the program is to be run.
(5) A GUI is a Graphical Utility Interface.
(6) The study of algorithms began in the 1900s when electronic computers began to be
used.
(7) A bus is a part of the computer that decides if a value should be stored as an integer
or floating point.
(8) Peripheral devices handle the coordination of a computer’s activities.
(9) Get method in HTML forms is used for debugging.
(10) “Pine” is an example of e-mail utility.
(B) Please choose the most appropriate answer from the given set of answers.
(13) Each cell of memory is numbered and that number is referred to as the cell’s
(a) Block (b) Identity (c) Address (d) Size
(b) What is Virtual Memory and how many ways it is implemented? In this context
describe some three process scheduling techniques? (10)
Explain how Gaussian elimination algorithm can be used to solve a linear system of
equations? Why this algorithm is suitable for parallelization? ‘ (10) (b) ‘ Explain various
addressing modes of instructions with examples. What is the process control Block and
what are its functions. (10)
1. (a) What factors would you consider if you are asked to design, a LAN from scratch? Assume that all
Hardware requirements can be. satisfied appropriately. (10)
(b) What is the basic difference between a Switch and a Hub State which device
controls the collision domains battery (10)
SECTION~11
4. (a) How the complexity of, an algorithm is measured? Define and explain Greedy
Algorithms. (10)
(b) Discuss various types of team structure that can be formed for software
development, Also explain briefly why the feasibility of producing quality software is’
reduced if project risk is great. (10)
5 (a) Provide three examples of fourth generation Software Engineering technique,
Explain COCOMO model for software estimation; Discuss your perception of ideal
training send background for a system analyst.
(b) Differentiate between the parameter passing paradigm “calls by value” and “call by
reference”. Also find out the result of the following expressions. Execute each
expression independently.
int a = 40. b = -8, c = 2, p * 9, q = 4, p= 12, x 5, >= 10
(a) x + =!(!x)*!!yc
(b) p = q + + %-q++
(c) x = (a% b> ?(a% c> 0 ? 3 ! 4 ): ( b> c ? 5 ! 6)
(d) P-=.q++%-q++
(e) x = P + + –q + + + h
6–
(a) Describe various 2D-transformations and represent them in normal form. (10)
(b) Explain the concept of ODBC, with the help of an architectural diagram.
What problems are caused by data redundancies? Can data redundancies be
completely eliminated when the database, approach is used? Why or why not? (10)
7–(a) Define 3NF, BCNF. Give an example of a relation in 3NF but not in BCNF.
Transform that relation in BCNF. What arc checkpoints? Where they are used? Why?
(10)
(b) With the help of appropriate diagram explain the CG! programming environment in
detail. Write a CG! based Peri script that keeps track of the number of visitors to the
home page of a certain site. (10)
COMPULSORY QUESTION
8–(A) Write only True or False in the Answer Book. Do not reproduce the question.
(1×10)
(1) A feature of an operating system that allows more than one program to run
simultaneously is called Multitasking.
(2) A trackball operates like a joystick on its back. It is extremely useful when there isn’t
enough space to use a mouse,
(3) Digitizing Tablet is a’special Input device that is mainly used to digitize vector-
oriented design or pictures.
(4) Dedicated line is a high speed cable line that is not permanently wired into the
internet.
(5) A Router is a network device that helps LANs and WANs achieve interoperability
and connectivity and thai can link LANs that have different network topologies, such as
Ethernet and Token Ring.
(6) Internet Protocol is a routable protocol in the backbone that is responsible for IP
addressing, routing, and the fragmentation and reassembly of IP packets.
(7) Telnet is an Internet connection that enables a user to terminate an active
connection with a computer at a remote site.
(8) ESD stands for Electronic Static Distance.
(9) IRQ is Interrupt Request.
(10) Copyright computer programs made available on trial basis are called shareware.
(B) Please choose^he most appropriate answer from the given set of answers. . (.1×5)
1. (a) Explain the two strategic technologies to make the computer speedier; RISC and Parallel Processing.
Hence also differentiate between RISC and CISC.(10)
(b) Discuss the sequential, indexed and direct data organization. (10)
SECTION II
1. (a) Suppose that a non-negat*’ve weight w(e) is associated with each edge in an undirected graph G =
(V, E), give an efficient algorithm to find an acyclic subset of E of total maximum weight. (10)
(b) How can the number of strongly connected components of a graph change if a new
edge is added? (10)
1. (a) Differentiate between Object Oriented Programming and Procedural Programming. Also explain the
concept of Abstraction in OOP. (10)
(b) Data-flow diagrams are means of documenting end-to-end data flow through a
system;
SECTION III
1. (a) What is the difference between a data entity in first normal form (Inf) and second normal from
(2NF)? Give an example of an entity in INF and show its conversion to 2NF. (10)
(b) List and briefly describe the three table operations used to manipulate relational
tables. (10)
1. (a) What is Polygon Mesh Representation? Give at least two examples of polygon modeling
strategies.(10)
(b) What are the tools to develop web pages in dynamic contents? (10)
COMPULSORY QUESTION
(A) Write the terms, on your answer book, for whom the following abbreviations stand
for: (5)
(i) DML (ii) EDI (iii) OLE (iv) SDLS (v) RAID (5).
(B) Please choose the most appropriate answer from the given set of options about all
the following given statements. (5)
(i) When all access and processing is done in one location, a computer system is said to
be
(a) networked (b) distributed (c) centralized (d) linked
(iii) The type of modulation that changes the height of the single is called
(a) frequency (b) phase (c) amplitude (d) prophase
(v) The technology whereby part of the program is stored on disk and is brought into
memory for execution as needed is called
(a) memory allocation (b) virtual storage (c) interrupts (d) prioritized memory
(C) Write ‘”True” or “False” in your answer book about the following statements: (5)
SECTION II
1. a) Explain the term Information Hiding. Also differentiate between Top-down design and Bottom-up
design.
b) Discuss briefly the main characteristics of object oriented programming.
5 . a) Show that by removing at most O(lg n) edges, we can partition the vertices of any
n-vertex tree into two sets A and B such that |A|=[n/2] and |B|=[n/2].
b) Give an efficient algorithm to determine if an undirected graph is bipartite.
SECTION III
1. a) Differentiate between an operational database and a warehouse. What types of applications does each
serve?
b) What is the difference between a data entity in second normal form (2NF) and third normal form
(3NF)? Give an example of an entity in 2NF and show its conversion to 3NF.
2. a) What is client side programming?
b) What are the tools to develop website fast and viewable?
COMPULSORY QUESTION
Q.1 (a) explain the difference between the main memory and secondary memory of
computer system
(b) explain the concept of multiprogramming and multitasking in Electronic data
processing
Q.2 (a) explain virtual memory management techniques of computer operating system
(b) explain processing scheduling policies of the operating system
Q.3 (a) describe the layering concepts in OSI model of Network architecture with
functions of each layer
(b) explain the advantages and disadvantages of internet
Section II
Q.4 (a) explain in detail various types of program control structures in C/C++
environment
(b) explain arrays in C/C++ giving examples
Q.5 (a) explain the following types of data structure giving example
(1) stack (2) queue
(b) in software engineering explain the object oriented software design
Section III
Q.8 (A) Write the terms on your answer book for whom the following abbreviations
stand for:
(B) Choose the most appropriate answer from the given set of options:
(C) write true (T) or false (F) in your answer book about following statements:
11) programs are loaded into main memory by the operating system’s memory manager
12) with sequential access, records can be accessed in any order
13) the process of removing errors from a program is called compilation
14) data flow over a bus is parallel
15) one instruction is fetched and executed by computer during a single machine cycle
Q1 (a) What is difference between a process and a thread? Explain your answers with
examples.
(b) What is thrashing? Explain different page replacement algorithms.
Q2 (a) Explain ISO/OSI seven layers reference model with detailed functions of each
layer.
(b) Why analog signal is converted into digital? Explain analog to digital conversion
methods.
Section-2
Section-3
Q6 (a) Why we use normalization? Explain 1NF,2NF,3NF with at least one example.
(b) Explain three levels of database architecture with one example of each level.
Q8 Compulsory Question.
Computer Science CSS Paper 2008
SECTION I
Q2. (a) Compare the TCP/IP and OSI network and describe the functionality of at least
two Transport and two network layer protocols
(b)Differentiate between the message switching and packet switching. Which one is
better for data networks?
(c)Describe various network Flow control protocol
SECTION II
Q5(a)What are view and how they are defined in SQL? Describe the rules pertaining to
data updating through views
(b)Describe the process of Normalization and various Normal forms through
examples.Also describe two integrity rule
SECTION –III
Q7 (a) Write note on various internal sorting algorithms. Develop the merge sort
algorithm and develop the pseudo code for its implementation.
(b) Write a note on the following data structures:
(i) STACK (ii) QUEUE (iii) DE-QUEUE
Also describe various functions that can be performed on t hem and write the C++ code
for implementation of these functions.
Q.1. Select the best option/answer and fill in the appropriate box on the Answer Sheet.
(20)
(ii) In the Base + Offset addressing, Offset address is also known as:
(a) Physical Address (b) Logical Address (c) Actual Address (d) Instruction Address (e)
None of these
(iii) The technique for allowing a unit to check the status of another independently
function unit is known as?
(a) Interrupt (b) System call (c) Polling (d) Trape (e) None of these
(iv) The method for storing data temporarily such that the input-output of the same job is
overlapped with its own processing, is known as:
(a) Spooling (b) Contention (c) I/O wait (d) Buffering (e) None of these
(v) The DMA that uses Busses when CPU is not using them is termed as:
(a) Shared DMA (b) Cycle Stealing (c) Channel (d) Transparent DMA (e) None of these
(vi) _________ Scheduler deals with the decision as to whether to admit another new
job to the system.
(a) High Level (b) Medium Level (c) Low Level (d) Short term (e) None of these
(vii) When the process is in the states of Blocked Suspended or Ready Suspended, its
relevant data is stored in:
(a) Main Memory (b) Hard Disk (c) Magnetic Tape (d) Buffer (e) None of these
(viii) Priority, P = (Time Waiting + Run Time) / Run Time is used to calculate priority in
__________ scheduling algorithm:
(a) Shortest Job First (b) Priority Scheduling (c) Longest Wait First (d) Highest
Response Ratio Next (e) None of these
(x) _________ is the generic name for a set of standards issued by the International
Communications Standards Body CCITT, designed to support Message Handling
Systems; i.e. Electronic Mail.
(a) TCP/IP (b) ISDN (c) X.400 (d) X.25 (e) None of these
(xi) ________ layer is responsible for the transfer of a packet of data along one link in
the network. It organizes data into frames and detects errors in transmission.
(a) Physical Layer (b) Data Link Layer (c) Network Layer (d) Transport Layer (e) None
of these
(xii) Encryption is the conversion of data in some intelligible format into an unintelligible
format called _________ to prevent the data from being understood if read by an
unauthorized party.
(a) Clear Text (b) Encrypted Text (c) Cipher Text (d) Coded Text (e) None of these
(xiii) Binary search requires about ______ comparisons with an initial list of 1,000,000
elements.
(a) 10 (b) 20 (c) 35 (d) 100 (e) None of these
(xiv) A _________ header list is a header list where the last node contains the null
pointer.
(a) Grounded (b) Circular (c) One way (d) Rooted (e) None of these
(xv) ________ are small applications that are accessed on an internet server,
transported over the internet, automatically installed and run as part of a web document.
(a) Applets (b) Java Bean (c) Sockets (d) Java Component (e) None of these
(xvi) AWT stands for:
(a) Abstract Window Technique (b) Abstract Window Toolkit (c) Actual Window
Technique (d) Added Window Toolkit (e) None of these
(xviii) ________ is stored on a client and contains state information of the website
visited.
(a) Cookies (b) Servlet (c) History (d) Resident Page (e) None of these
(xx) The ________ Process Model defines a series of events that will trigger transitions
from state to state for each of software engineering activities.
(a) Spiral (b) Operational (c) RAD (d) Concurrent Development (e) None of these
PART – II
SECTION – I
Q.2. Explain ANY FOUR. (20)
(i) Cache Memory (ii) Static & Dynamic RAM (iii) Instruction Cycle (iv) Buses & their
types (v) Segment Registers (vi) Instruction Pipelining
SECTION – II
Q.4. (a) What are Virtual Functions? And how they can be utilized for polymorphism?
Use C++ for writing example program. (10)
(b) Explain with examples ANY TWO: (10)
(i) Inheritance & Aggregation (ii) Data Hiding & Encapsulation (iii) Constructors &
Destructors (iv) Class, Object and Abstraction
Q.5. (a) Write and explain algorithm for Binary Search. (8)
(b) Explain ANY THREE: (12)
(i) Stack & Queue (ii) Tree & Graph (iii) Linked List & Array (iv) Algorithm & Program (v)
Complexity of Algorithm
Q.6. (a) Explain the terminologies of Process, Methods and Tools. (6)
(b) What is Software Process Model? Explain Spiral Process Model. (14)
SECTION – III
Q.7. (a) What is a Database? Explain and differentiate Relational Database Model from
the other Database Models. (10)
(b) Explain with example Entity Relationship Diagram. (10)
(i) Computer Graphics (ii) Pixel Art (iii) Vector Graphics (iv) Computer Animation (v)
Rendering (vi) 2D & 3D Graphics
Q.1. Select the best option/answer and fill in the appropriate box on the Answer Sheet.
(20)
(i) Object (also called ____) is a common data type that includes photograph, audio,
video, or a document created in other applications.
(a) Number (b) BLOB (c) Integer (d) Binary (e) None of these
(iv) If the lowest annual fee at a discount warehouse is Rs.2025 and the highest is Rs.
5550, a(n) ____ on the Annual Fee field ensures it is a value between Rs. 2025 and Rs.
5550.
(a) Range Check (b) Completeness Check (c) consistency check (d) alphabetic/numeric
check (e) None of these
(vi) _______ is a network technology that defines how messages are routed from one
end of a network to the other, ensuring the data arrives correctly by dividing it into
packets.
(a) HTML (b) XML (c) HTTP (d) TCP/IP (e) None of these
(vii) When a computer sends data over the Internet, the data is divided into small
pieces, or ____.
(a) Bundles (b) Packets (c) Slices (d) Baskets (e) None of these
(viii) The amount of data, instructions, and information that can travel over a
communications channel sometimes is called the ____.
(a) Broadband (b) Baseband (c) Latency (d) Bandwidth (e) None of these
(ix) Fiber-optic cables have all of the following advantages over cables that use wire
except ____.
(a) lower costs and easier installation and modification (b) faster data transmission and
smaller size (c) less susceptible to noise from other devices (d) better security for
signals during transmission
(e) None of these
(x) A ____ is a network that connects computers and devices in a limited geographical
area, such as a home, school computer laboratory, or office building.
(a) local area network (LAN) (b) metropolitan area network (MAN) (c) wide area network
(WAN) (d) variable area network (VAN) (e) None of these
(xi) With ____ memory, the operating system allocates a portion of a storage medium,
usually the hard disk, to function as additional RAM.
(a) Virtual (b) Performance (c) Device (d) Managed (e) None of these
(xii) If a new device, such as a printer or scanner, is attached to a computer, its ____
must be installed before the device can be used.
(a) Driver (b) Platform (c) Manager (d) Kernel (e) None of these
(xiii) A ____ is an icon on the desktop that provides a user with immediate access to a
program or file.
(a) Kernel (b) Spooler (c) Buffer (d) Shortcut (e) None of these
(xiv) ___ a disk, or reorganizing it so the files are stored in contiguous sectors, speeds
up disk access and thus the performance of the entire computer.
(a) Formatting (b) Defragmenting (c) Spooling (d) Compressing (e) None of these
(xv) The term, computer ____, describes a potentially damaging computer program that
affects, or infects, a computer negatively by altering the way the computer works without
the user’s knowledge or permission.
(a) Hotspot (b) file compression utility (c) virus (d) file conversion utility (e) None of
these
(xvi) In a diagram such as the one pictured in Figure below, a(n) ____ shows the input
or output of information into or out from a process.
(a) use case (b) data flow (c) entity relationship (d) class diagram (e) None of these
(xvii) Although used in all types of business modeling, the ____ has been adopted as a
standard notation for object modeling.
(a) UML (b) CASE Tool (c) USE CASE diagram (d) EMR (e) None of these
(xviii) For each input and output, a systems analyst typically develops a(n) ____, which
is a sample of the input or output and contains actual data. (a) Adaptation (b) Prototype
(c) Mockup (d) feasibility scheme (e) None of these
PART – II
NOTE: (i) PART-II is to be attempted on the separate Answer Book.
(ii) Attempt ONLY FOUR questions from PART-II, selecting at least ONE question from
each SECTION. All questions carry EQUAL marks.
(iii) Extra attempt of any question or any part of the attempted question will not be
considered.
(iv) Use of Calculator is allowed.
SECTION – I
Q.2. (a) List OSI Seven Layers in order and briefly describe functions of each layer.
(10+6+4)
(b) What is difference between IPv4 and IPv6. Why IPv6 was developed when there
IPv4 was already available and implemented?
(c) What is difference between physical address, logical address, domain and port
number?
Q.3. Consider the following set of processes, with the length of the CPU-burst time
given in milliseconds (8+4+4+4)
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time
0.
(a) Draw four Gantt charts illustrating the execution of these processes using FCFS,
SJF, non preemptive priority (a smaller priority number implies a higher priority), and RR
(quantum = 1) scheduling.
(b) What is the turnaround time of each process for each of the scheduling algorithms in
part a?
(c) What is the waiting time of each process for each of the scheduling algorithms in
part a?
(d) Which of the schedules in part a results in the minimal average waiting time (over all
processes)?
Q.4. (a) Consider a logical address space of eight pages of 1024 words each, mapped
onto a physical memory of 32 frames. (6+10+4)
(i) How many bits are there in the logical address?
(ii) How many bits are there in the physical address?
(b) Consider the following segment table:
0 219 6
1 2300 14
2 90 100
3 1327 580
4 1952 96
What are the physical addresses for the following logical addresses?
(i) 0,430 (ii) 1,10 (iii) 2,500 (iv) 3,400 (v) 4,112
(c) What are the four necessary conditions for deadlock? Define each condition.
SECTION – II
class Crectangle
{
private:
int width, height;
public:
CRectangle (int, int);
~CRectangle ();
int area (void)
{
return (width *height);
}
};
CRectangle::CRectangle (int a, int b)
{
width = a;
height = b;
}
void main ()
{
CRectangle recta (3,4), rectb (5,6);
1 2 5 7 9 11
If you perform the binary search, for each of the search keys given below, write down
the sequence of array values that are compared with the search value during the
search.
(b) Trace the execution of SELECTION SORT on the following array by showing the
contents of the array after every step.
20 18 10 15
(c) If we implement the binary search tree with an array A, what will be the status of the
array A after inserting the values {7, 4, 1, 3, 11} to an initially empty tree?
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] A[9
SECTION – III
Q.7. (a) Why normalization is used in relational databases? Define second and third
normal form with an example. (10+3+3+4)
(b) What is difference between primary key and the alternate key? Why primary key is
used in each relation?
(c) What is difference between weak entity and strong entity?
(d) Draw an entity relationship diagram between EMPLOYEES, DEPARTMENTS and
PROJECTS assuming that each project can be started by only one department and
each employee can be employed by only one department at a time. Write down any
other assumption if you use it.
Q.8. (a) Given a point P(10, 10). Rotate this point around origin O(0, 0) at an angle of 90
degree anticlockwise and calculate the resulting point (8+8+4)
(b) Write down the conditions for point clipping (c) What are the major components of a
Cathode Ray Tube (CRT). Write down names only
(ii) Hyper threading technologies deliver two processing threads per physical core for a
total of _____ massive computational throughout.
(a) 2 (b) 8 (c) 16 (d) 32 (e) None of these
(iii) _____ unit is capable of mimicking the processor and taking over control of the
system bus just like microprocessor.
(a) Control (b) DMA (c) I/O (d) PPI (e) None of these
(vi) Software testing is a critical element of software quality assurance and represents
the ultimate view of _____, _____ and _____ in that order.
(a) Code, design, specification (b) Specification, design and code generation (c) Design,
specification, code (d) Code generation, specification, design (e) None of these
(vii) _____ is an integration testing approach that is commonly used when shrinking
wrapped software products are being developed.
(a) Testing (b) Smoke testing (c) Portability testing (d) Both (b) and (c) (e) None of these
(viii) Determine the result of attempting to compile and run the following code:
(x) A static partitioned memory management system has a total of six partitions. If one
is allocated to the operating system, this will allow a total of: (a) Five user jobs (b) Six
user jobs (c) Thirty-two user jobs (d) Thirty-six user jobs (e) Sixty-four user jobs
(xvii) Identify the type of routing protocol that maintains a topological database of the
network?
(a) Topological State (b) Shortest Path First (c) Link State (d) Distance Vector (e) None
of these
(xviii) The data portion of an information unit at a given OSI layer potentially can contain
headers, trailers and data from all the higher layers, known as:
(a) Compression (b) Buffer (c) Encapsulation (d) Spooling (e) None of these
(xix) Identify the type of routing protocol that exchanges entire routing tables at regular
intervals.
(a) Link State (b) Interior Gateway Protocols (c) Apple Talk Routing (d) Distance Vector
(e) None of these
(xx) Which environment considers memory, process and device and file management
from a global viewpoint?
(a) Distributed Operating System (b) Network Operating System (c) Multiprogramming
Operating System (d) All of these (e) None of these
PART-II
(ii) Attempt ONLY FOUR questions from PART-II, selecting at least ONE question from
each SECTION. All questions carry EQUAL marks.
(iii) Extra attempt of any question or any part of the attempted question will not be
considered.
SECTION – A
Q.3. (a) Consider a slotted ring of length 10 km with a data rate of 10 Mbps and 500
repeaters, each of which introduces a 1-bit delay. Each slot contains room for one
source-address byte, one destination-address byte, two data bytes and five control bits
for a total length of 37 bits. How many slots are on the ring? (09)
(b) Compare the capacity allocation schemes for IEEE 802.5 token ring and FDDI. What
are the relative pros and cons? (05)
(c) Compare the individual fields of the IPv4 header with the IPv6 header. Account for
the functionality provided by each IPv4 field by showing how the same functionality is
provided in IPv6.(06)
SECTION – B
Q.4. (a) Calculate the software cost for building, reusing, buying and contracting a
software system by considering the following decision tree diagram. What decision
would you like to take for this kind of software system? (12)
(b) Software requirement analysis is unquestionably the communication intensive step
in the software process. Why does the communication path frequently break down? (08)
Q.5. (a) What is polymorphism? How can we achieve polymorphism in Java and what
are its prerequisites? (08)
(b) Write exception hierarchy in Java. Enlist the methods of Arithmetic exception, I/O
Exception,
Array Index Out of Bounds Exception Classes. (12)
Q.6. (a) Describe the use of Print Stack Trace Method. Consider STACK with memory
size 8. Initially it is empty. Find out the output of the following algorithm: (09)
(b) Elucidate the concept of Hashing. Explain in brief the various methods used to avoid
collision in Hashing. (04)
(c) Insert Key Records: 76, 93, 40, 47, 10, 55 (in this sequence) into the Hash Table of
length m = 7 with the Hash Function H(K) = K mod m. Perform linear and quadratic
probing. (07)
SECTION – C
Q.8. (a) What is normalization process? Explain the steps to normalize a relation with
suitable examples. (09)
(b) Explain the DIFFERENCE between Client Side Technologies and the Server Side
Technologies with some examples. (06)
(c) Define the following briefly: (1 x 5 = 5)
(i) VB script (ii) Servlet (iii) CGI (v) SOAP (iv) UDDI
Q.3. (a) In case of CSMA, what can station do if there is access conflict (there
are many contending nodes). (05)
(b) What is the key difference between Frequency Division Multiplexing and
Frequency Hoping Spread Spectrum? (05)
(c) Define Framing. Give reasons for its need. (05)
(d) What is the role of address field in a packet travelling through a virtual
circuit network? (05)
SECTION-B
Q.5. (a) You are given head of single linked list. Write code to count number
of nodes in it (any language). (08)
(b) Write formula to access a particular node of two dimensional array in a
row-major order. Consider the start address of a two dimensional array
A[10][10] to be 200, then compute the address of A[3][5] using your formula,
considering each element takes 4 bytes. (06)
(c) Write code to push and to pop elements in a stack. (06)
Q.6. (a) Give at least five differences between classical waterfall way of
software development and evolutionary development. (06)
(b) Explain requirement engineering process with proper model diagram. (06)
(c) Write a use case of your choice in expanded form for the Player
Information System of Pakistan Cricket Board (PCB). (08)
SECTION-C
Q.7. (a) “We can have a relation that is in 3NF but not in BCNF”, explain this
point by giving an example. (03)
(b) Write six basic properties of a database relation. Which one of these
properties is different from those of a mathematical relation? (03)
(c) Create an ER diagram for each of the following descriptions associating
two or three attributes with each entity type: (08)
(i) Each company may operate up to four departments, and each department
must belong to one company.
(ii) Each department in part (i) employs one or more employees, and each
employee works for one or more departments.
(iii) Each of the employees in part (ii) may or may not have one or more
dependants, and each dependant belongs to one employee.
(iv) Each employee in part (iii) may or may not have an employment history.
(v) Some of the employees are managers for other employees.
Q.8. Suppose a user vote for his favourite food from a dynamic combo box
populated from database and the user must be able to make multiple food
selections per request. You can use database of your choice. You are
required to implement the following functionality.
(a) Store the favourite foods and the number of votes for each food. (08)
(b) Display all foods and their number of votes for each food. (06)
(c) Display the top three foods. (06)
5. The necessary conditions needed before deadlock can occur are ________.
a. No Mutual Exclusion, Hold and wait, Preemption, Circular Wait. b. Mutual Exclusion,
No Hold and wait, Preemption, Circular Wait. c. Mutual Exclusion, Hold and wait, No
Preemption, Circular Wait. d. Mutual Exclusion, Hold and wait, Preemption, No Circular
Wait.
6. Differences between data lick layer and transport layer error detection is that:
a. Data link detects transmission errors while transport layer detects segmentation
faults. b. Data link detects node-to-node errors while transport layer detects end-to-end
errors. c. Data link detects end-to-end errors while transport layer detects node-to-
node errors d. Data link detects segmentation errors while transport layer detects bit
error. e. None of theses
7. Phase Shift Keying (PSK) method is used to modulate digital signals at 9600 bps using
16 levels. The line signals speed (i.e. modulation rate) will be:
a. 1200 bands b. 2400 bands c. 4800 bands d. 9600 bands e. None of these
8. Exception handling is a powerful technique that separates error-handling code from
______ code
a. Buggy b. Faulty c. Normal d. Exceptional e. None of these
9. When a subroutine is called, the address of the instruction following the CALL
instructions stored in/on the:
a. Stack pointer b. Accumulator c. Programs counter d. Stack e. None of these
11. What value will return to the operating system upon the successful completion of a
program?
a. -1 b. 1 c. 0 d. None of these
15. Which of the following operations need the participating relations to be union
compatible?
a. UNION b. INTERSECTION c. DIFFERENCE d. All of these e. None of these
16. The language used in application programs to request data from the DBMA is referred
to as the:
a. DML b. DDL c. VDL d. SDL e. None of these
19. (2,4) is a point on a circle that has center at the origin. Which of the following points
are also on circle?
a. (2,-4) b. (-2,4) c. (4,-2) d. All of the above e. None of these
Attempt ONLY FOUR questions from PART-II, selecting at least ONE question from
EACH section. All questions carry EQUAL marks.
Part – II
SECTION A
Q.2. (a) Define latency, transfer and seek time with respect to disk I/O. Compare given
disk scheduling algorithm for cylinder requests in order 11, 1, 36, 16, 34, 9, 12: (8)
First-come, first-served (FCFS)
Shortest-seek-time-first (SSTF)
SCAN and C-SCAN
LOOK and C-LOOK
(b) Write short notes on the following: (4 each = 12)
a. Semaphore b. Belady’s Anomaly c. Thrashing
Q.3. (a) What is the significance of OSI model in communication paradigm/ Compare
layers of OSI with TCP/IP protocol stack. (8)
(b). Compare IEEE 802.3, IEEE 802.4 and IEEE 802.5? Also mention their problems
and applications. (8)
(c). Differentiate between Link State and Distance Vector routing protocols. (4)
SECTION B
Q.4. (a) What is the concept of inheritance in OOP paradigm? How can we achieve
inheritance in JAVA? (8)
(b). Why is a B+ tree a better structure than an AVL tree for implementation of an
indexed sequential file? Explain this with an example. (6)
(c). Convert the expression ((A+B)*C-(D-E)^(F+G)) to equivalent Prefix and postfix
notations. (6)
Q.5. (a) describe the spiral model of software development with its application. (7)
(b). Write a note on the following:
(i) Software Quality Assurance (5)
(ii) Smoke Testing (4)
(iii) Extreme Programming (4)
SECTION C
Q.6. (a) What are the main features of Relational data model? Why is it more useful
than Hierarchical data model? (7)
(b). What is 2PL? Give a schedule of two complete transactions that are not allowed by
‘strict 2PL’ scheduler but are accepted by basic 2PL scheduler. (7)
(c). Write note on any ONE of the following: (6)
a. ERD b. Normalization
Q.7. (a) Why is the significance of JavaScript in web development? Why is input
validation done on client side? (5)
(b). Explain any THREE of the following: (5 each = 15)
(i) Affiliate Marketing (ii) Web Services (iii) Server Side Scripting (iv) SEO
Computer Science CSS Paper 2014
Q.No.2.
(a) The processor must have a process to handle exceptions.
Explain four things that the processor must be able to identify and/or take care of.
(b) Discuss the essential servers/services that are used to complete an intranet.
(c) Discuss why BIOS are not changed frequently.
Q.No.3.
(a) Distinguish between the architecture of x86 to a 68000 processor.
(b) Differentiate differences of Unix operating system over Microsoft window OS.
(c) Write a note on network topology. Which topology will you prefer for an techniques?
SECTION-B
Q.No.4.
(a) What advantages are provided in OOP over other conventional programming
techniques?
(b) Draw a data structure of a course registration system for a university level institute.
(c) Discuss some cost estimation techniques used in software engineering.
Q.No.5.
(a) Write a do-while loop to compute the sum of the first 30 positive odd integers.
(b) Write a note on sorting algorithm. Write pseudocode for for insertion sort.
(c) What are the key issues on which software engineering do work with?
SECTION-C
Q.No.6
(a) Discuss the concepts of data independence in DBMS.
(b) Web-applications are getting popular now a days.Write a note on languages use for
web-application developments.
(c) What is the difference between Raster and Vector Graphics? Write down at least
four differences.
Q.No.7.
(a) Write a note on DATA Models.
(b) Discuss essential issues in network programming.
(c) Define ‘Transformation’ and discuss briefly its types.
Computer Science CSS Paper 2015
Q. 2. (a) Why Registers are used in CPU operations? Define the purposes of MAR, IR
and Program Counter.
(b) Give scheme for Deadlock Prevention.
(c) Elaborate the concept of IPV6. Explain its advantages over IPV4.
Q. 3. (a) Explain the functionality of seven layers of OSI reference model and map with
TCP/IP protocol suite.
(b) Discuss Instruction Execution Cycle.
(c) Briefly explain Paging and Segmentation with diagrams.
SECTION B
Q. 4. (a) Explain the functionality of Hash Table. By supposing that table size is 100,
give steps to insert data 112, 2023, 3001 into Hash Table and then to search 2023 from
Hash Table.
(b) What is the difference between Function Overloading and Function Overriding?
Explain your answer by giving example syntax for each one.
(c) Write short notes on; the following:
I. USE CASE Diagram
II. Activity Diagram
Q. 5. (a) Write down difference between:
I. Data Hiding and Encapsulation
II. Constructor and Copy Constructor
(b) Build and draw a Binary Search Tree for the following input data 25, 11, 75,69, 115,
50, 72, 17, 200, 60, 35.
(c) Explain Incremental Model of Software Engineering by giving its
advantages over other models.
SECTION C
Q. 3. (a) Define a function named monthly-profit which will calculate the monthly profit
on the given investment amount. Function will take two float arguments, percent profit
rate and investment amount and return the monthly profit (float). Write function
prototype, function definition and a main program to demonstrate the functionality.
Sample execution of the program is given below. Note that monthly profit 4000 has
been calculated by the function by doing (8/100) * 50000. User can enter any values
therefore write generalized function (user variables, not given values). (6)
Enter percent profit rate: 8
Enter investment amount: 50000
Monthly profit: 4000
Press Any Key to Continue….
(b) Explain and differentiate between volatile and non-volatile memory. giving examples.
(6)
(c) Suppose you are trying to build a Library Information System using object oriented
approach. System should be able to keep track of books issued and returned. It should
be able to calculate fine if a book is late. Currently you are required to design classes
i.e. not to write C-H- code but describe which class you will define, which data members
you will add. which member functions you will include in those classes. Define only
suitable classes and suitable attributes (data members) in C++ ntax. Names of some
classes are like. Student. Teacher. Book. Issue Book etc. You can (but not required to)
extend this list of four classes if you think of some other suitable classes. (8)
Q. 4. (a) Define a structure to store records of Persons. We want to store only Name,
age and address of Person. Write main program to input record of one person and
display ‘Young’ if its age is less than 20 or ‘Old’ if the age is greater than 50 and ‘Middle’
if the age of person is between 21 and 49. Sample execution of the main program is
given below: (6)
Enter Name = Kashif
Enter Age = 19
Enter Address = H 120, St: 08, KAR.
Person is YOUNG
Press Any Key to Continue
(b) Convert given binary numbers to Decimal, Octal and Hexadecimal. (6)
(i) 100(2) (ii) 10100(2) (iii) 1001010(2)
(c) Suppose you are designing software for a Medical Store, using object oriented
techniques. Decide and define classes (like ‘Person’, ‘Customer’, ‘Salesman’,
‘Purchase’ etc.) and their attributes in C++ or Java syntax. You are not required to write
any member functions and main programme. You must use inheritance where suitable.
(8)
SECTION II
Q. 5. (a) Describe the followings (no description with more than three lines); (8)
i. Sibling Nodes ii. Degree of a tree iii. Leaf Node iv. Height/ Depth of a tree v. Binary
Tree vi. Full Binary Tree vii. Complete Binary Tree viii. Maximum number of nodes in a
Binary Tree at level L.
(b) Find the time complexity of Binary search by resolving the recurrence (given below)
using iterative substitution method. (6)
T(1) =2 if n =< 1
T(n) = 4 + T(n/2) if n>1
(c) Draw the given array in the form of binary tree. Then apply ‘Build-Heap’ Algorithm to
convert the given tree in the form of Max-Heap (i.e. draw final Max-heap in the form of
tree and array). Finally show execution of ‘Heap-sore algorithm by rewriting the Heap
array after each iteration of the algorithm. (6)
A = {8, 14, 2, 26, 10, 12, 16, 28, 20, 7}
Q. 6. (a) Write Abstract Data Types (ADT) of Stack and Queue. Include the
specifications of Add, Delete, IsEmpty, IsFull functions along with their respective
functions. (8)
(b) For step count expressions n2 + 10 and 2n / 4 find breakeven point i.e. for which
value of n (starting from 1,2…) second expression will become greater than value of first
expression. (6)
(c) In AVL tree balance factor of every node is -1 or 0 or +1. We can calculate the
balance factor as Height left-sub-tree – Height right-sub-tree. Construct AVL tree from
the given data; (6)
A = {8, 14, 2, 26, 10, 12, 16, 28, 20, 7}
Q. 7. (a) Draw a diagram that illustrates the process of translating a C++ source file into
an executable file. Give example of each phase depicted in your diagram of compilation
process. (5)
(b) Compare and contrast among compiler, interpreter and assembler. (5)
(c) Describe Software Development Life Cycle (SDLC). Explain your answer with the
help of depicting and describing different phases of pure waterfall software life cycle. (5)
(d) What is the difference between SRS document and design document? What are the
contents we should contain in the SRS document and design document. (5)
Q. 8. (a) What are the purposes of Data Flow diagrams, Entity-Relationship diagrams?
Give an example diagram of each. (5)
(b) Explain five properties of language using the example of English. Explain why a
software language like MiniJava meets these properties as well. (5)
(c) Lexical analysis: Consider the following regular expression
r1= (A | …. |Z) * (0| …. I 9)*
Describe the language defined by r1 in English. Turn r1 into an equivalent finite
automaton. Remove E-moves from the finite automation. (5)
(d) What do you mean by Context Free Grammar (CFG)? Illustrate your answer with
examples. (5)
Q. 4. (a) What are differences between Optimal & LRU (Least Recently Used) page
Replacement Policies? (8)
(b) Discuss the four necessary conditions for deadlock to occur. How can we deny any
two of these conditions? (6)
(c) Consider three processes given in the table. Find average waiting time and average
turnaround (completion) time when these processes are scheduled using Round-Robin
scheduling using time quantum (TQ) = 4. (6)
Process | CPU Burst
P1 | 24
P2 | 7
P3 | 10
Q. 5. (a) Explain the functionality and purposes of following registers with diagrams: (8)
(i) Memory Address Register (MAR)
(ii) Memory Buffer Register (MBR)
(iii) Instruction Register (IR)
(b) Discuss the functionality of Ethernet LAN and its types. (6)
(c) What happens in the following cases? (6)
(i) If the job size is kept very low in time sharing systems.
(ii) If the page size is kept very small in paged memory management.(6)
SECTION-B
Q. 6. (a) What is Normalization? Discuss 1NF, 2NF and 3NF with example(s). (8)
(b) Write short notes on the following: (i) Data (ii) Database (iii) Database Management
System (6)
(c) Differentiate between Centralized Database and Distributed Database. (6)
Q. No.3. (A) Differentiate between hub, bridge, switch and router. (8)
(B) Discuss how Network Address Translation (NAT) works and why is it useful? (6)
(C) Elaborate the working of multiplexing/demultiplexing at the transport layer. (6)
Q. No.4. (A) There are three processes PA, PB and PC and three resources RA, RB
and RC. Resources RA and RB have one instance each while resource RC has two
instances. PA is holding one instance of RC and has requested for RA. Process PB is
holding RA and has requested for RB. RB is allocated to PC which has also requested
an instance of RC. Represent the scenario with a resource allocation graph. Discuss
whether there is a deadlock or not? If yes, which processes are blocked? (8)
(B) In the context of Paging, consider the case where memory addresses are 32 bits i.e.
20 bits Virtual Page Numbers and 12 bits of offset. How many virtual pages are there
and what is the size of each page? Given the virtual address 0x7589, find the virtual
page number and offset. If the respective page table entry contains 0x900DF, find the
physical address. (6)
(C) In the context of I/O management, differentiate between Pooling and Interrupts. (6)
Section – B
Q. No.5. (A) Given two relations R and S, where R contains M tuples, S contains N
tuples, and M >N > 0, give the minimum and maximum possible sizes (in tuples) for the
resulting relation produced by each of the following relational algebra expressions. (8)
i. R – S
ii. R ∪ S
iii. R ∩S
iv. R ⋈ S
(B) Elaborate the concepts of super key, candidate key and foreign key with examples.
(6)
(C) Discuss the difference between physical data independence and logical data
independence. (6)
Q. No.6. (A) Differentiate between image sampling and quantization. Discuss how these
concepts relate to spatial and intensity resolutions. (8)
(B) In the context of image smoothing, discuss the differences between mean and
median filters. (6)
(C) For the image ‘X’ shown in Figure 1, show the result of applying the given
morphological operators. Assume zero padding for border pixels. (6)
i. Dilation of X by structuring element [1 1 1].
ii. Erosion of X by structuring element [1 1 1]َT
Q. No.7. (A) Perform histogram equalization on the 8-bit image shown in Figure 2. (8)
(B) For the 3×3 image shown in the following, apply the horizontal and vertical Sobel
operators and compute the magnitude of gradient at the central pixel with intensity value
50. (6)
5 5 5
5 50 5
5 5 5
(C) In the context of compression, differentiate between coding, spatial and temporal
redundancies. (6)
Q. No.8. (A) Elaborate the concept of three tier architecture with reference to
presentation, business logic and data access layers. (8)
(B) Differentiate between XHTML and XML. (6)
(C) Discuss Agile and Water Fall methodologies in the context of web application
development. (6)
Q. No. 2. (a) Compare the main features of CISC and RISC architectures.
Which type of architecture is suitable for pipelining? (8)
(b) Demonstrate use of superscalar approach to achieve instruction level
parallelism using a suitable example. (6)
(c) List all basic functions of buses in the context of computer architecture. (6)
(20)
Q. No. 3. (a) Show field by field comparison for IPv4 and IPv6 packets. (8)
(b) Explain the following routing techniques using suitable examples. (6)
(i) Link State Routing (ii) Distance Vector Routing
(c) Show step by step procedure of error detection using cyclic redundancy
check method for a 7 bit code block “1001001”. Assume appropriate generator
polynomial. (6) (20)
SECTION-B
Q. No. 6. (a) Analyze the following noise models in the context of digital image
processing. (8)
(i) Gaussian Noise Model (ii) Uniform Noise Model
(b) Compare RGB and HSI color models in the context of digital image
processing. (6)
(c) Describe step by step process of application of compression based
technique for image segmentation. (6) (20)
Q. No. 2. (a) Write a C / C++ program which implements binary logical ‘AND’,
‘OR’ and ‘NOT’ gates. The program takes binary number and desired logical
gate as inputs and outputs the desired output of the gate. (8)
(b) Write a C/C++ program which inputs a number from a user and prints
Fibonacci series up to the number. (7)
Q. No. 3. (a) Write standard ports for following services HTTP, FTP, SMTP,
HTTPS, DNS. (4)
(b) Design an appropriate interface for citizen portal mobile application. The
interface should contain different features which are part of the portal
application. The Interface may contain different screens to support these
features. (8)
(c ) If you are transferring a file over the Internet, would you prefer TCP or
UDP as the underlying protocol. Explain. (4)
(d) If you are transferring live audio in real time over the Internet, would you
prefer TCP or UDP as the underlying protocol. Explain. (4)
Q. No. 4. (a) Write a program to perform mathematical operations of addition,
subtraction and multiplication on complex numbers. Each operation should be
supported by a separate method. (8)
(c ) Write a program to convert numbers into words. For instance, if the user
types 123, the program should give output one hundred and twenty three. The
program should continue functioning until the user types quit. (4)
SECTION B
Q. No. 6. John plans a Van service from new square (S) to the city harbor (T).
The van service charges Rs. 16 per Km. There are numerous routes between
the two points.
(a) In order to rip off his customers, John always wanted to use the longest
path. To find the longest path, John evaluates all the possible paths and
selects the longest path. Write an algorithm to select the longest path using
this approach. (7)
(c ) Write an algorithm to find a minimum distance between ‘S’ and ‘T’ (7)
Q. No. 7. (a) How many tokens are there in the C code printf(“k – %d, &k –
%x”, k, &k). (5)
(b) Create State Transition Table from the following graph (5)
(c ) Draw Finite State Automata which accepts following input: (4)
i. JIM ii. JMI iii. JJIIM iv. JJMMII
(d) Determine which of these inputs are valid for the FSM shown below: (6)
i. aaaaa ii. ababa iii. abcabc iv. abccba v. acbcd vi. acbcdcd
(b) List and briefly define two approaches to dealing with multiple interrupts. (6)
Q. No. 3. (a) What is kernel of an operating system? Explain the difference between a
monolithic and microkernel. (7)
(b) What is the difference between simple and virtual memory paging? Also explain the
purpose of translation lookaside buffer. (6)
(d) If you are transferring live audio in real time over the Internet, would you prefer TCP
or UDP as the underlying protocol. Explain. (4)
Q. No. 4. (a) Compare IPv4 and IPv6 headers. Explain the use of NAT technology to
overcome IPv4 scarcity. (8)
(b) Find the maximum number of valid subnets and usable hosts per subnet that you
can get from the network 172.23.0.0/23. (6)
(c ) List and briefly define any THREE file organization techniques. Also explain basic
Linux file system security. (6)
Q. No. 5. What is signal encoding? Explain different encoding techniques used in data
communication. (8)
(b) Explain the functions and needs of ARP and RARP protocols in computer networks.
(5)
(c) Explain multiplexing and demultiplexing at the transport layer. Explain in the context
of TCP/IP protocol. (7)
SECTION B
Q. No. 6. (a) What is the purpose of a join in SQL? Explain inner, left, right and full join
with the help of examples. (8)
(b) Construct an E-R diagram for a hospital with a set of patients and a set of medical
doctors. Associate with each patient a log of the various tests and examinations
conducted. (7)
Q. No. 7. (a) What is Histogram equalization? Explain the process and discuss its uses.
(6)
(b) Explain types of color models. Also discuss the most common hardware oriented
color models in detail. (8)
(c) What is translation and scaling? Find the number of bits required to store a 256×256
image with 32 gray levels. (6)
(B) How will you search an item in a linked list. Write algorithm? Marks: 10
Q3) a. if you have been assigned a task to set up a lab of 20 computers. What
factors you should consider to set up a LAN and a WAN network.
b Explain the TCP/1P reference model with the help of a labeled diagram.
Section-B
Q4) a. Write a program to input marks (out of 100) of five subjects of a student
from the keyboard. Calculate the percentage of marks. Make use of the switch
statement to show grades (A, B, C, according to the percentage obtained.
b. What is the difference between virtual functions and pure virtual functions in
C++?
Section- C
Q7) a. What is an ER Model and what does it represent? Identify the entities
involved in an accounts section of a school system and represent it using ER
Model.
b. Describe the concept and role of normalization. Why INF, 2NF, and 3NF
are important in a Relational database?
Q8)a. Write HTML code for designing a “sign in and sign up” web page using
form including text boxes of email address and Password with respective
captions.
b. What is CGI? Explain the concept of CGI in Perl programming.
Demonstrate with a suitable code example.
2 List the different programming paradigms along with their differentiating feature(S)
and application areas. Also give name of two languages for each paradigm. (4-5 lines
each) (20)
3 Describe Relational, Temporal. Logic-Based and Spatial Databases along with their
area of application (4-5 lines each). What is the purpose of Dataware House and what is
its link with Data Mining (5 7 lines)? (20)
4 Define Mealy and Moore machines. Design a synchronous counting machine, with
minimum number of gates and flip-flops, which can generate the sequence 1, 3, 5, 7, 2,
4 in the given order in binary form. (20)
5 The greatest common divisor of integers a and b is the largest integer that evenly
divides both a and b. Write recursive function gcd that returns the greatest common
divisor of a and b. The gcd of a and b is defined recursively as follows: if b is equal to 0,
then gcd (a, b) is a; otherwise gcd (a, b) is gcd (b, a%b), where % is the modulus
operator. Use any programming language of your choice and also draw the flowchart.
(20)
6 In a bank management system, there are customers which can open account with
single or multiple ownership. Customer can avail the facility of leasing if the salary is
greater than 30,000/month. Customer can also request for credit card facility. One
account is associated with exactly one branch of bank as bank is having multiple
branches. One branch is having exactly one manager and vice versa. Draw Entity
Relationship Diagram (ERD) using any notation of the scenario discussed above. (20)
Computer Science Punjab PMS Paper II
2009
Q1 (a) Define the following terms: • Unit Testing • Integration Testing • Black box
Testing • Stress Testing • Regression Testing
(10 marks)
(c) What is the significance of the Software Design phase in the software life cycle?
What models and artifacts are created during this phase using object-oriented design
method? (5 marks)
Q2. (a) Compare the waterfall model of software development to evolutionary and
iterative development methods? (10 marks)
(b) What is white box software testing? (5 marks)
(c) What is the most expensive phase in the software life cycle? Also discuss why it is
the most expensive phase (5 marks)
Q 3. Define, draw and compare following search strategies in a tabular form with
respect to their completeness, time space and optimality a) Breadth-first search. b)
Uniform-cost search: c) Depth-first search, and d) Iterative deepening search (20
marks)
Q 4. (a) Define learning and compare Inductive learning with Decision tree learning In
which cases do we use these two methods and why? (14 marks)
(b) What is conditional independence? Define Bayes rule (6 marks)
Q5 (a) Why double buffering is used in OpenGL? What changes are required in the
following to accommodate double buffering?
SECTION – B
Q. No. 6 Discuss the designing and implementation of Full Address and Full
subtract computational logics.
SECTION – C
SECTION B
Q No.4: a) Define OSI model and explain the functioning of each layer in OSI model.
b) Define HDLC. Explain different frame formats with control field used by HDLC?
c) What are the characteristics of fast Ethernet? (10 + 7 + 3 = 20 Marks)
b) What is difference between Combinational logic & Sequential logic? Explain with
diagram.
c) What are the differences between TCP and UDP header formats? (10 + 5 + 5 = 20
Marks)
SECTION C
Q. No. 2: (a) Find parse trees, left most and right most derivations for each of the
following statements?
(i) (b, b) (ii) (b, (b,b)) (iii) (b, ((b,b), (b,b)))
(b) What is a code generator in compilers? Draw the position of code generator and
explain issues of code generator with suitable examples? (12 + 8 = 20 Marks)
Q.No. 3: (a) What are the advantages and disadvantages of Multi-pass Compiler
compared to a One-pass compiler.
(b) Discuss different issues related to Memory management and instruction selection in
the design of Code generator. (10 + 10 = 20 Marks)
Q. No. 4: (a) Differentiate between Raster scanning and Random Scanning techniques.
(b) What is meant by Clipping also explain any one clipping algorithm. (10 + 10 = 20
Marks)
Q. No. 6: (a) Describe various CPU scheduling algorithms and justify your answer with
the help of suitable examples?
(b) Explain the structure of a distributed operating system and its advantages? (10 + 10
= 20 Marks)
Q.No. 7: (a) Define Testing and explain the difference between white box testing and
black box testing.
(b) Describe the role of Risk analysis in an evolutionary process model like the “spiral
Model” (10 + 10 = 20 Marks)
(b) Use the trapezoidal rule of numerically integrate f(x) from a = 0 to b = 2, where f(x)=
0.2+ 25x +3x2
Also computer Relative Error
(10 + 10 = 20 Marks)