Spring2010 Midterm Opkst Cs201
Spring2010 Midterm Opkst Cs201
Spring2010 Midterm Opkst Cs201
Spring 2010
CS201- Introduction to Programming
Ref No: xxxxxxx
Time: 60 min
Marks: 38
Student Info
Student ID:
Center:
Exam Date:
Marks
Q No. 9 10 11 12 13 14 15 16
Marks
Q No. 17 18 19 20 21 22 23
Marks
Question No: 1 ( Marks: 1 ) - Please choose one
Compiler is a
System software
Application Software
Driver
Editor
For one byte there are _____ combinations of values that can be stored in computer.
26
27
28
24
Question No: 4 ( Marks: 1 ) - Please choose one
In C/C++ language the header file which is used to perform useful task and manipulation of
character data is
cplext.h
ctype.h
stdio.h
delay.h
Must
Optional
syntax error
Necessary
33
45
30
What is the correct syntax to declare an array of size 10 of int data type?
name[10] int ;
int name[10] ;
int name[] ;
n dimensions
2n dimensions
(n+1) dimensions
What will be the correct syntax to access the value of fourth element of an array using pointer
ptr?
ptr[3]
(ptr+3)
*(ptr+3)
Both 1and 3
Which of the following values C++ use to represent true and false?
1 and 0
1 and -1
11 and 00
True
False
For which array, the size of the array should be one more than the number of elements in an
array?
int
double
float
char
If a variable is passed by value to a function and the function makes some changes to that
variable then it
Header file
Preprocessor Directive
Statement
Function
Decision
Repetition
Sequential
Hierarchical
Which variable will be used in inner code block if we have the same names of variable at outer
code block and inner code block?
Which standard library is included when your program reads from, or writes to, files?
Question No: 20 ( Marks: 3 )
Perform left shift operation on a binary number 0101 and write the result in binary and decimal.
Write a C/C++ program which defines an array of 15 elements and fill the array with string
"12players2teams".
This program should display that how many digits and alphabets the string "12players2teams"
contains using Character handling functions.