"O" level course of DOEACC Scheme is equivalent to a Foundation Level Course in Computer Applications. Students can acquire this qualification by undergoing this course and passing the examination conducted by the NIELIT.
1. Each question below gives a multiple choice of
answers. (1x10)
1.1 What will be output if you
will compile and execute the following c code?
#include<stdio.h>
int main(){ int a=5; float b;
printf("%d",sizeof(++a+b)); printf(" %d",a);
return 0;}
A) 2 6
B) 4 6
C) 2 5
D) 4 5
1.2 What will be output if you
will compile and execute the following C code?
#include<stdio.h>
int main(){
int check=2;
switch(check){
case 1: printf("D.W.Steyn");
case 2: printf(" M.G.Johnson");
case 3: printf(" Mohammad Asif");
default: printf(" M.Muralidaran");
}
return 0;
}
A)
M.G.Johnson
B)
M.Muralidaran
C) M.G.Johnson
Mohammad Asif M.Muralidaran
D)
Compilation error
1.3 How many times "IndiaBIX"
is get printed?
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("IndiaBIX");
}
return 0;
}
A)
Infinite times
B) 11
times
C) 0 times
D) 10
times
1.4 What do the following
declarations signify? void *cmp();
A) cmp
is a pointer to an void type.
B) cmp
is a void type pointer variable.
C) cmp is a function
that return a void pointer.
D) cmp
function returns nothing.
1.5 When following piece of code
is executed, what output will be generated?
#include<stdio.h>
int main(){
char arr[7]="Network";
printf("%s", arr);
return 0;
}
A)
Network
B) N
C) Garbage value
D)
Compilation error
1.6 The result of a Relational
operation is always
A) either True or
False
B) is
less than or is more than
C) is
equal or less or more
D) All
of the above
1.7 The keyword used to transfer
control from a function back to the calling function is
A)
switch
B)
goto
C) go
back
D) return
1.8 What is the similarity between
a structure, union and enumeration?
A) All
of them let you define new values
B) All of them let
you define new data types
C) All
of them let you define new pointers
D) All
of them let you define new structures
1.9 How many times is a do while
loop guaranteed to loop?
A) 0
B)
Infinitely
C) 1
D) Variable
1.10 Which of the following can
not be used as identifiers?
A)
Letters
B)
Digits
C)
Underscores
D) Spaces
2. Each statement below is either TRUE or FALSE. Choose
the most appropriate one
and ENTER in the “OMR” answer sheet supplied with the
question paper, following
instructions therein. (1x10)
2.1
NULL pointer points the base address of segment. FALSE
2.2
Comma operator is used for separation. TRUE
2.3
The size of a structure can be determined by both size of variable name and
size of
(struct
tag). TRUE
2.4
While loop is post tested loop. FALSE
2.5
All of the following are valid expressions in ‘C’. TRUE
a = 2
+ (b = 5);
a = b
= c = 5;
a = 11
% 3
2.6 A
variable is a string that varies during program execution. TRUE
2.7
void (*ptr)() is a pointer to a function which receives nothing and returns
nothing. TRUE
2.8
Calling a uninitialized variable will provide zero value. FALSE
2.9
‘C’ language can not be used for database manipulation. TRUE
2.10
In ‘C’, if you pass an array as an argument to a function, value of elements in
array actually
gets
passed? FALSE
3. Match words and phrases in column X with the closest
related meaning/
word(s)/phrase(s) in column Y. Enter your selection in
the “OMR” answer sheet
supplied with the question paper, following instructions
therein. (1x10)
A. p is pointer to
an array of integer
B. Unending
loop if no break statement inside the body
C. returning a
pointer to the beginning of the block
D. p is function
that returns pointer to integer
E. allocates
memory but does not clear memory
F. Two
G. can be used to
create variables of old types
H. One
I. is
a memory location that is used by several different variables, which may be
of different type
J. *(p
+ i)
K. is
different memory location that is used by several different variables, which
may be of different type
L. can
be used to create variables of new types
M. allocate
and clear memory
|
3.1
size of void pointer in byte H
3.2
p[i] can be written as J
3.3
Union I
3.4
malloc() C
3.5
Typedef G
3.6
int(*p)[10] A
3.7
Structure K
3.8
calloc( ) E
3.9
int(*p)(void*,void*) D
3.10
for(;;) B
4. Each statement below has a blank space to fit one of
the word(s) or phrase(s) in the
list below. Enter your choice in the “OMR” answer sheet
supplied with the question
paper, following instructions therein. (1x10)
A. bit
B. header
file
C. Fseekf
D. Call
by value
E. static
F. exit
G. Index
H. stdio.h
I. break
J. Ctype.h
K. unstructured
L. getc
M. pointer
|
4.1 A
function call mechanism that passes arguments to a function by passing a copy
of the
values
of the arguments is ____D____.
4.2
NULL is macro constant which has been defined in the heard file ____H____.
4.3
Function ____C____
repositions the file position pointer to the beginning of the file.
4.4 A
library function ____F____ causes an exit from the program in
which it occurs.
4.5
The ____I____
statement causes an exit from the innermost loop or switch.
4.6
____E____
data member can only be used in static functions.
4.7
____M____
cannot be legitimately passed to a function.
4.8
The smallest data item a computer can process is called a(n) ____A____.
4.9 An
array element is accessed using an ____G____ number.
4.10
Name the header file to be included for the use of built in function isalnum()
is ____J____
.
No comments:
Post a Comment