CLICK HERE FOR VARIOUS NEW JOBS 
CLICK HERE FOR VARIOUS EDUCATIONAL NEWS 
CLICK HERE FOR NEW SCHOLARSHIPS 
CLICK HERE FOR ADMISSION NOTICES 
Click And Follow On Google+ To Get Updates
Please Wait 10 Seconds... OR You CanSkip

ADMISSION NOTICES
Scholarships

Scholarship-300x291

BUDGET 2014-15
budget_2014-2015
New Date Sheets
VU SOLVED ASSIGNMENTS
Recent Posts

Posts Tagged ‘(Session – 1 )’

Virtual University CS201 – INTRODUCTION TO PROGRAMMING MIDTERM EXAMINATION (Session – 1 ) SPRING 2007

Virtual University CS201 – INTRODUCTION TO PROGRAMMING MIDTERM EXAMINATION (Session – 1 ) SPRING 2007

MIDTERM EXAMINATION

SPRING 2007

CS201 – INTRODUCTION TO PROGRAMMING

(Session – 1 )

Marks: 50

Time: 90min

StudentID/LoginID:

Student Name:

Center Name/Code:

Exam Date:

______________________________

______________________________

______________________________

Saturday, May 12, 2007

Please read the following instructions carefully before attempting any

of the questions:

1. Attempt all questions. Marks are written adjacent to each question.

2. Do not ask any questions about the contents of this examination

from anyone.

a. If you think that there is something wrong with any of the

questions, attempt it to the best of your understanding.

b. If you believe that some essential piece of information is

missing, make an appropriate assumption and use it to solve the

problem.

c. Write all steps, missing steps may lead to deduction of marks.

d. All coding questions should be answered using the Dev-C++/C ++

syntax.

e. Choose the most appropriate choice (among the given) while answering

the MCQs.

You

are

not

allowed

to

use

any

compiler

or

IDE.

**WARNING: Please note that Virtual University takes serious note of

unfair means. Anyone found involved in cheating will get an `F` grade

in this course.

For Teacher’s use only

Question

Marks

Question

Marks

1

11

2

12

3

13

4

14

5 6 7 8 9 10 Total

Question No: 1

( Marks: 1 )

– Please choose one

Analysis is the ————– step in designing a program

► Last

► Middle

► Post Design

► First

Question No: 2

( Marks: 1 )

– Please choose one

The remainder (%) operator is,

An arithmetic operator

► A logical operator

► A relational operator

► A division operator

Question No: 3

( Marks: 1 )

– Please choose one

When a call to function statement is encountered,

► The control is transfer to its Prototype

► The control is transfer to its definition

► The compiler stop execution of whole program

► The program hangs

Question No: 4

( Marks: 1 )

– Please choose one

In C/C++ language when an array is passed to a function then by default its passing

Mechanism is,

► Call by value

► It depends on type of array

► Call by Reference

► It depends on the return type of function.

Question No: 5

( Marks: 1 )

– Please choose one

Computer can do,

► More than what we tell it

► Less then what we tell it

► Like human being

► Exactly what we tell it

Question No: 6

( Marks: 1 )

– Please choose one

int x = 2 * 3 + 4 * 5;

What value will x contain in the sample code above?

► 22

► 26

► 46

► 50

Question No: 7

( Marks: 1 )

– Please choose one

In flow chart process is represented by

► Rectangle

► Arrow symbol

► Oval

► Circle

Question No: 8

( Marks: 1 )

– Please choose one

Which one of the following will declare a pointer to an integer at address 0x22ff74 in memory?

► int *x;

*x = 0x22ff74;

► int *x = &0x22ff74;

► int *x = *0x22ff74;

► int *x( &0x22ff740 );

Question No: 9

( Marks: 1 )

– Please choose one

When we are using const keyword with a variable x then initializing it at the time of declaration is

► Must

► Optional

► Not necessary

► A syntax error

Question No: 10

( Marks: 1 )

– Please choose one

int numarray[4][4] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

What value does numarray [0][3] in the sample code above contain?

► 3

► 5

► 7

► 4

Question No: 11

( Marks: 5 )

Write Header files for the functions,

i.

ii.

iii.

iv.

v.

sqrt();

getline();

printf();

exit();

rand();

Question No: 12

( Marks: 5 )

Write down the output of the following code?

int array[7], sum = 0;

for(int i=0;i<7;i++)

{

array[i] = i;

sum+= array[i];

}

cout<< “ Sum = “ <<sum;

Question No: 13

( Marks: 15 )

Write a program which consists of three variables Area, Per, Base, this program should find

and display the area of triangle using the formula,

Area = (Base * Per)/2 ;

Take the value of variables Per and Base from the user.

Question No: 14

( Marks: 15 )

Write a function BalerAvg which calculate and display the average of a player (Baler), call this

function in main program (function). Take input of runs given and ball delivered from the user in

main funciton.

The average may be calculated by the formula,

Average = (Total Runs given * 60) / (Total number of balls delivered);

Virtual University CS201 – INTRODUCTION TO PROGRAMMING MIDTERM EXAMINATION (Session – 1 ) SPRING 2007

VU CS201 – INTRODUCTION TO PROGRAMMING MIDTERM EXAMINATION (Session – 1 ) SPRING 2007

VU CS201 – INTRODUCTION TO PROGRAMMING MIDTERM EXAMINATION (Session – 1 ) SPRING 2007

www.Educational.pk

MIDTERM EXAMINATION

SPRING 2007 Marks: 50

CS201 – INTRODUCTION TO PROGRAMMING Time: 90min

(Session – 1 )

StudentID/LoginID: ______________________________

Student Name: ______________________________

Center Name/Code: ______________________________

Exam Date: Saturday, May 12, 2007

Please read the following instructions carefully before attempting any

of the questions:

1. Attempt all questions. Marks are written adjacent to each question.

2. Do not ask any questions about the contents of this examination

from anyone.

a. If you think that there is something wrong with any of the

questions, attempt it to the best of your understanding.

b. If you believe that some essential piece of information is

missing, make an appropriate assumption and use it to solve the

problem.

c. Write all steps, missing steps may lead to deduction of marks.

d. All coding questions should be answered using the Dev-C++/C ++

syntax.

e. Choose the most appropriate choice (among the given) while answering

the MCQs.

You are not allowed to use any compiler or IDE.

**WARNING: Please note that Virtual University takes serious note of

unfair means. Anyone found involved in cheating will get an `F` grade

in this course.

www.Educational.pk

For Teacher’s use only

Question 1 2 3 4 5 6 7 8 9 10 Total

Marks

Question 11 12 13 14

Marks

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

Analysis is the ————– step in designing a program

Last

Middle

Post Design

First

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

The remainder (%) operator is,

An arithmetic operator

A logical operator

A relational operator

A division operator

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

When a call to function statement is encountered,

The control is transfer to its Prototype

The control is transfer to its definition

www.Educational.pk

The compiler stop execution of whole program

The program hangs

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

In C/C++ language when an array is passed to a function then by default its passing

Mechanism is,

Call by value

It depends on type of array

Call by Reference

It depends on the return type of function.

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

Computer can do,

More than what we tell it

Less then what we tell it

Like human being

Exactly what we tell it

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

int x = 2 * 3 + 4 * 5;

What value will x contain in the sample code above?

22

www.Educational.pk

26

46

50

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

In flow chart process is represented by

Rectangle

Arrow symbol

Oval

Circle

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

Which one of the following will declare a pointer to an integer at address 0x22ff74 in memory?

int *x;

*x = 0x22ff74 ;

int *x = &0x22ff74;

int *x = *0x22ff74;

int *x( &0x22ff740 );

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

www.Educational.pk

When we are using const keyword with a variable x then initializing it at the time of declaration is

Must

Optional

Not necessary

A syntax error

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

int numarray[4][4] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

What value does numarray [0][3] in the sample code above contain?

3

5

7

4

Question No: 11 ( Marks: 5 )

Write Header files for the functions,

i. sqrt();

ii. getline();

iii. printf();

iv. exit();

v. rand();

Question No: 12 ( Marks: 5 )

Write down the output of the following code?

www.Educational.pk

int array[7], sum = 0;

for(int i=0;i<7;i++)

{

array[i] = i;

sum+= array[i];

}

cout<< “ Sum = “ <<sum;

Question No: 13 ( Marks: 15 )

Write a program which consists of three variables Area, Per, Base, this program should find

and display the area of triangle using the formula,

Area = (Base * Per)/2 ;

Take the value of variables Per and Base from the user.

Question No: 14 ( Marks: 15 )

Write a function BalerAvgwhich calculate and display the average of a player ( Baler), call this

function in main program (function). Take input of runs given and ball delivered from the user in

main funciton.

The average may be calculated by the formula,

Average = (Total Runs given * 60) / (Total number of balls delivered);

VU CS201 – INTRODUCTION TO PROGRAMMING MIDTERM EXAMINATION (Session – 1 ) SPRING 2007

ALL NEW RESULTS
Educational News

Updated Educational News

Categories
POSTS BY DATE
December 2016
M T W T F S S
« Sep    
 1234
567891011
12131415161718
19202122232425
262728293031