# Education In Pakistan

## VU CS101- Introduction to Computing (Session – 2) FINALTERM EXAMINATION Fall 2008

.

FINALTERM EXAMINATION

Fall 2008

CS101- Introduction to Computing (Session – 2)

Question No: 1 ( Marks: 1 ) – Please choose one

Which function returns a randomly selected floating point number between 0 and 1 ?

► floor(x)

► ceil(x)

random()(Correct)

► round(x)

Question No: 2 ( Marks: 1 ) – Please choose one

Functions are also called:

► Heuristics

► Variables

► Arrays

► Subprograms

Question No: 3 ( Marks: 1 ) – Please choose one

In JavaScript, each element of array can store data of type

► A Number

► An Array

► A String variable

► All of the given choices

Question No: 4 ( Marks: 1 ) – Please choose one

The weaknesses of the computer are:

► Pattern recognition & Storage

► Speed & Innovative ideas

Pattern recognition & Innovative ideas (Correct)

► Speed & Storage

Question No: 5 ( Marks: 1 ) – Please choose one

Processed data is called ________.

Information (Correct)

► Data

► Entity

► Attribute

Question No: 6 ( Marks: 1 ) – Please choose one

Many developers write the _________ first and then incrementally convert each line into

_________.

► Real code & Pseudo code

► Pseudo code & Real code

► Real code & Artificial code

.

None of the given options (Correct)

Question No: 7 ( Marks: 1 ) – Please choose one

When we buy a software package, we do not really buy it, we just by a license that

allows us to use it, the ___________stays with the maker.

► Agreement

Ownership (Correct)

► Membership

► Software

Question No: 8 ( Marks: 1 ) – Please choose one

Name, Border, Source are the ____________ of the image object.

► Event Handler

► Properties

► Methods

► None of the given options

Question No: 9 ( Marks: 1 ) – Please choose one

Using smart editors they can automatically color different parts of statements in

different colors e.g. HTML tags in ____________ color.

► Green

► Grey

Blue (Correct)

► None of the given options

Question No: 10 ( Marks: 1 ) – Please choose one

____________ is in Executive team.

Project Manager (Correct)

► CEO

► Developer

Question No: 11 ( Marks: 1 ) – Please choose one

Module level design and unit testing the responsibility of _____________.

Developer (Correct)

► Project Manager

► Quality Assurance Expert

Question No: 12 ( Marks: 1 ) – Please choose one

_____________ team is responsible for a project after the specification’s stage till the

very end.

► Executive

► Architect

.

Development (Correct)

► HR

Question No: 13 ( Marks: 1 ) – Please choose one

_____________ waits for some time and then launch a function.

► Timeout( )

setTimeout( ) (Correct)

► setTime( )

► setTimeIn( )

Question No: 14 ( Marks: 1 ) – Please choose one

Which of the following is NOT an event handler for image object?

► onAbort

► onError

onUser (Correct)

Question No: 15 ( Marks: 1 ) – Please choose one

______________ is a field that uniquely identifies each record stored in a table.

► Composite Key

Primary key (Correct)

► Foreign key

► None of the given options

Question No: 16 ( Marks: 1 ) – Please choose one

Distance learning has got a boost due to the ___________.

► Easy communication

► Online interactive contents

► Flexibility

All of the given options (Correct)

Question No: 17 ( Marks: 1 ) – Please choose one

By default in a web page Hyper Link for another web page is represented as

________________

► Blue only

► Black and Underlined

► Blue and Bold

Blue and Underlined (Correct)

Question No: 18 ( Marks: 1 ) – Please choose one

To store rounded number of 8.6 in a variable called “r_number”, we write

_____________.

► r_number=Maths.round(8.6)

► r_numbers=Maths.rounds(8.6)

.

► r_number=Math.rounds(8.6)

r_number=Math.round(8.6) (Correct)

Question No: 19 ( Marks: 1 ) – Please choose one

Which one is the best option for designing a Medical Expert System?

► Rule Based System

► Genetic Algorithm

► Fuzzy Logic

► Neural Network

Question No: 20 ( Marks: 1 ) – Please choose one

Variables allow us to manipulate data through the ___________.

► Actual Value

Reference (Correct)

► Length

► Name

Question No: 21 ( Marks: 1 ) – Please choose one

Which is correct?

► All of the above

Question No: 22 ( Marks: 1 ) – Please choose one

Capturing events and responding to them is called __________.

► Function Handling

Event Handling (Correct)

► Event Procedure

► All of the given option

Question No: 23 ( Marks: 1 ) – Please choose one

___________ color should be used in background for a good presentation.

.

► Light

Dark (Correct)

► Red

► None of the given options

Question No: 24 ( Marks: 1 ) – Please choose one

Which of the following symbol is used for multiple line comments in JavaScript?

► /

► //

/* (Correct)

► //*

Question No: 25 ( Marks: 1 ) – Please choose one

In JavaScript, what will be the result of the follwoing operation

79%3

► 0

1 (Correct)

► 2

► 3

Question No: 26 ( Marks: 1 ) – Please choose one

A new cell using HTML is added in table row by

► <TC>…</TC>

<TR>…</TR> (Correct)

► <TD>…</TD>

► <NC>…</NC>

Question No: 27 ( Marks: 1 ) – Please choose one

TCP stands for ___________.

► Total communication protocol

Transmission control protocol (Correct)

► Transfer control protocol

► Transfer collection protocol

Question No: 28 ( Marks: 1 ) – Please choose one

What is NOT a key factor while designing a website?

► Usability

► User-friendly

► Consistency

Complexity (Correct)

.

Question No: 29 ( Marks: 1 ) – Please choose one

It represents the ________________ flow chart element.

► Process

► Input or Output

► Decision

► Connector

Question No: 30 ( Marks: 1 ) – Please choose one

Vacuum tubes were replaced by ___

► Punch cards

Transistors (Correct)

► Micro Processors

► Resistors

Question No: 31 ( Marks: 1 )

When does recursion occur?

Question No: 32 ( Marks: 1 )

What are the types of computer network according to the distance between nodes ?

There are two types of networks.

1. LAN (Local Area Network)

2. WAN (Wide Area Network)

Question No: 33 ( Marks: 2 )

What is meant by semantic error ?

Occur when a statement executes and has an effect not intended by the programmer

and Often times occur only in unusual & infrequent circumstances

Question No: 34 ( Marks: 2 )

List down the names of two array methods available in JavaScript.

1. sort( ) [sorts elements in alphabetical order]

2. reverse( ) [Reverses the order of elements]

Question No: 35 ( Marks: 3 )

How can you define a consistent web design? Why is it needed?

.

A consistent good designed website is generated for general public that allows users

to attain what they want as quickly as possible without spending much effort.

A consistent good design assists the user in recovering from errors.

Question No: 36 ( Marks: 3 )

How can we include images in a web page using HTML and Java script?

Image in HTML

<IMG src=URL, alt=text height=pixels width=pixels align=”bottom|middle|top“>

Image in Javascript

Images in JavaScript can be manipulated in many ways using the built-in object

Image.

Additional properties to HTML are hspace, vspace & lowsrc.

Example: It can be used by many handlers like, onAbort, onLoad & onError

Question No: 37 ( Marks: 3 )

The event handler attribute consists of three parts. Write about each of them.

The identifier of the event handler

The equal sign

A string statement enclosed in double or single quotes.

Question No: 38 ( Marks: 5 )

What is a packet in the network environment? What kind of information does it contain?

Packet is data chopped up into pieces in a network environment.

These packets contain information about which computer sent the data and

where the data is going.

If a packet runs into a problem during its trip, it can attempt to find another

route. When all the packets get where they are going, the recipient computer

puts them together again.

Question No: 39 ( Marks: 5 )

Suppose we have a big project. Draw hierarchy of the people involved in the project?

.

Please ignore small lines relating Sub Teams to subordinates due to shortage of

time. ABCD etc are connected directly to Team Lead 1,2 & 3 accordingly.

Question No: 40 ( Marks: 10 )

Write down HTML and JavaScript code for the following requirements:

Declare an Array with the identifier SUBJECT having length 5. Assign following values

to the array elements:

MIS, Java, Algorithms, Databases, C++

Show all values in reverse order.

Question No: 41 ( Marks: 10 )

How instant messaging works? Write the steps involved in this process.

The Instant Messaging services available allow us to maintain a list of people

(contacts) that we interact with regularly. We can send instant messages to any of

the contacts in our list as long as that contact is online.

Following steps are involved in IM working.

1. User commences the IM client.

Executive Team

Project Manager

Clients Project

Manager

Project Architect

Sub Team Lead 3

Sub Team Lead 2

A B

C D E F

A B

C D

A B

C

.

2. IM client finds the IM server & logs in.

3. It launches communication info (IP address, etc) to the IM server.

4. IM server finds user’s contacts & sends him/her the communication info.

5. IM server also notifies the contacts that the user is online; sends his/her

communication info to them.

6. The user’s & the contact’s IM clients are ready to communicate directly

(P2P).

7. As new contact has come online, IM server informs them about the user

being online & vice versa.

8. Multiple, real-time chat are possible.

9. When the user logs-off, his/her IM client informs the IM server.

10. IM server wipes away the temporary file and informs the user’s contact’s

about his/her ‘offline’ status.

Education In Pakistan © 2016