Cs201 Mid Spring2007 s1
Cs201 Mid Spring2007 s1
com
http://forum.vupages.com
Largest Online Community of VU Students
MIDTERM EXAMINATION
SPRING 2007 Marks: 50
CS201 - INTRODUCTION TO PROGRAMMING Time: 90min
(Session - 1 )
StudentID/LoginID: ______________________________
► Last
► Middle
► Post Design
► First
►
An arithmetic operator
► A logical operator
► A relational operator
► A division operator
In C/C++ language when an array is passed to a function then by default its passing
Mechanism is,
► Call by value
► Call by Reference
int x = 2 * 3 + 4 * 5;
What value will x contain in the sample code above?
► 22
► 26
► 46
► 50
► Rectangle
► Arrow symbol
► Oval
► Circle
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;
► Must
► Optional
► Not necessary
► A syntax error
► 3
► 5
► 7
► 4
i. sqrt();
ii. getline();
iii. printf();
iv. exit();
v. rand();
Write a program which consists of three variables Area, Per, Base, this program should find
and display the area of triangle using the formula,
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,