Você está na página 1de 11

www.studentsbooklet.

com
COMPUTER
SCIENCE
ONE MARK TEST 4
Time: 45 min
Choose the best
answe!
1
. The functions that return no value are declared as
a) Public
2
. Which are the building blocks of C !rogram"
a) #nstruction
$
. Which of the follo%ing is the starting !oint of the e&ecution of a !rogram"
a) 'oid
4
. Which function e&ecutes faster but re(uires more memor) s!ace"
a) #n line
5
. *unction should be declared
a) +t the beginning of the !rogram
b) +fter the) are
called
c) ,efore the) are used in a !rogram
d) +t the end of the !rogram
-
.
#n ........ method/ an) change in the formal !arameter is not reflected back to
the
actual !arameter.
a) Call b) reference
b) Call b)
value
c) both 0a) 1
0b)
2
. + function can be invoked from another function using its ..........
a) 'ariables b) 3ame c) 4eturn
5
.
......... statement marks the end of the function and also transfers control to
the
after call
statement
a) 6o to b) Continue c) 4eturn
9. Which is the
channel
through
%hich data
from the call
statement to
the function
and vice
versa"
a) 3ame b)
4eference c)
Parameter d) +ll of
these
1
www.studentsbooklet.com
1
7
. #f the function that does not return a value"
a) 'oid
1
1
.
Which of the follo%ing is the sco!e resolution
o!erator"
a
)
:
1
2
. What is the name of the variable %hich defines %ithin a block"
a) 8ocal
1$.
The
ke)%
ord
inline
is
used
in the
....
....
..
a
)

9
a
i
n

f
u
n
c
t
i
o
n

b
)

:
u
b

f
u
n
c
t
i
o
n

c
)

*
u
n
c
t
i
o
n

h
e
a
d
e
r

d
)

'
o
i
d

f
u
n
c
t
i
o
n
1
4
.
......... cannot be accessed from outside the block of its
declaration"
a) *ile variable
b) 8ocal
variable
c) Class
variable
d) *unction
variable
1
5
. Which of the follo%ing reduces the s!eed or !rogram e&ecution"
a) :tacks
b) :torage
classes c) *unctions d) Tokens
1
-
. Which statement marks the end of the function"
a) 'oid main 0 ) b) ;1< c) 4eturn d) < curl) braces
1
2
.
+rra)s are referred b) a
.........
a) 'ariables b) :ubscri!ts
c) Common
name d) +ll of these
1
5
. The si=e of the arra) should al%a)s be .........
a) Positive b) in b)tes c) negative d) +ll of these
1
>
.
......... !arameters are re(uired for %rite
function
a) Three b) *our c) T%o d) *ive
2
7
. The arra) inde& al%a)s starts %ith .........
a) ?7 b) @ero c) A7 d) an) of these
2
1
.
:trings are called
as
a) Characters b) Constants c) #dentifiers d) 8iterals
2
2
. + character arra) should be terminated %ith a ......... character
a) B7C b) B7DC c) BE7C d) B7EC
2
www.studentsbooklet.com
2$. The follo%ing function com!ares the t%o given
strings
a) strcm) 0 )
24. To
treat
s!ace
s as
!art of
string
literal/
one
has to
use
.....
....
a
)

g
e
t
s

0

)

b
)

C
i
n

c
)

F
i
th
er
0a
)
or
0d
)
d)
g
etl
in
e
0 )
2
5
. The declaration of strings is same as ......... dimensional arra).
a) T%o b) 9ulti c) Three
2-. gets 0 ) defined in .......... header file
a) conio.h b) stdlib.h c) stdio.h
2
2
.
Getermine the number of elements of into a H17I
H2I
a) 12 b) 22 c) 44
2
5
. #n a 2JG arra) the first subJscri!t stands for
a) ro% b) column c) diagonal
2
>
. What %ill be the si=e of an arra) int sales H2I H4I"
a) 24 b)tes b) 5 b)tes c) 1- b)tes
$
7
. Which are the e&ecutable segments in a !rogram"
a) Gata t)!es b) :tatements c) *unctions
$
1
.
Ko% man) t)!es of sco!e are
there"
a) $ b) 2 c) 4
$
2
.
Geclaration of a function is made through the
function"
a) LbMect
$
$
.
Which communicate %ith the function through arguments or
!arameter"
a) 3ame
$
4
.
#nline ke)%ord is Must a re(uest to
the
a) *unction b) Program c) LbMect
3
www.studentsbooklet.com
$
5
.
The ......... reveals the hidden sco!e of
variable.
a) *ile sco!e
b) *unction
sco!e
c) 8ocal sco!e
d) :co!e
o!erator
$
-
. ......... refers to the accessibilit) of a variable"
a) *unction b) :co!e c) #dentifier d) +rguments
$
2
.
#n the absence of actual arguments/ the formal !arameter takes the .......
arguments.
a) *ormal b) Constant c) Gefault d) +ctual
$
5
.
The function returning a reference can a!!ear on the ........ side of an
assignment.
a) 8eft hand b) 4ight hand c) ,eginning d) Fnd
$
>
. #n the follo%ing code/ the sco!e of the variable b is ........
if 0&A))
;
int bN
b
<
a) 8ocal sco!e b) *ile sco!e c) Class sco!e d) *unction sco!e
4
7
.
:tring mani!ulators are defined in if .........
header.
a) :tring b) :td.h c) :t.h d) :tring.h
4
1
.
+ character arra) 0string) should be terminated %ith
a
a) 3umber b) :tring c) 3ull d) @ero
4
2
.
Which is the member function of the standard in!ut
stream"
a) gets b) getline 0 ) c) cin d) cout
4
$
.
........ is derived data t)!e in C

a) float b) char c) int d) arra)


4
4
.
#n ........ t)!e of arra)/ matrices can be
re!resented
a) $G arra) b) 1G arra) c) 2G arra) d) 4G arra)
4
5
.
The !rocess of arranging the data in a given arra) is
called
a) 9erging b) Lrdering c) *iltering d) :orting
4
www.studentsbooklet.com
4
-
.
......... is the follo%ing function co!ies source string to target
string
a) strlen 0 )
4
2
.
......... function returns the number of characters stored in the
arra)
a) strlength 0 )
4
5
. +rra)s are of ......... t)!es
a) 1
4
>
. Write 0 ) is a member function of standard .......... stream
a) #n!ut
50. #n arra) of
strings/ the
si=e of the
..........
inde&
determines
ma&imum
length of each
string.
a) *irst b)
Third c) :econd
d) *ourth
5

Você também pode gostar