"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 Function of a compiler is to
A) put together the file and functions that are required by the program
B) translate the instructions into a form suitable for execution by the program
C) load the executable code into the memory and execute them
D) allow the user to type the program
1.2 The preprocessor directives start with
A) //
B) /
C) #
D) /*
1.3 Which of the following defines a variable ‘a’ as an array of pointers to integers?
A) int *b[10], a[10];
B) int *b, a[10];
C) int b, *a[10];
D) int b, (*a)[10];
1.4 Which of the following is not an infinite loop?
A) for (i = 1; i < 10; i--)
1.7 Consider a structure defined as follows:
1.10 Which of the following can be used as a variable name?
A) no of students
B) char
C) 7th
D) myName
3.1 A necessary function J
3.2 Pre-decrement I
3.3 Typecasting H
3.4 Call by reference G
3.5 Linked list B
3.6 Recursion C
3.7 Bitwise operator F
3.8 Removes dynamically allocated space K
3.9 Function to read the contents of a file E
3.10 Comparing contents of two character
arrays str1 and str2 L
4.1 A file can be opened for both reading and writing using _____A___ mode.
4.2 The preferred storage class if fast access is required for a variable is ____H____.
4.3 A function call for a function with the declaration void fn(int x, char c); is ____I___.
4.4 __ B______ is the file automatically connected to the keyboard for every program.
4.5 ___D____ is the character stored in the pointer value of the last node of a linked list.
4.6 The ___K____ operators are used to compare the values of integers.
4.7 If *pf is a pointer to float, then ++pf will increment its value by ____C____.
4.8 The brackets used to mark the boundaries of a block are ____J____.
4.9 Relevant ____L____ files have to be included in a program for library functions to work.
4.10 p -> name can be written as ____F____.
1. Each question below gives a multiple choice of answers. (1x10)
1.1 Function of a compiler is to
A) put together the file and functions that are required by the program
B) translate the instructions into a form suitable for execution by the program
C) load the executable code into the memory and execute them
D) allow the user to type the program
1.2 The preprocessor directives start with
A) //
B) /
C) #
D) /*
1.3 Which of the following defines a variable ‘a’ as an array of pointers to integers?
A) int *b[10], a[10];
B) int *b, a[10];
C) int b, *a[10];
D) int b, (*a)[10];
1.4 Which of the following is not an infinite loop?
A) for (i = 1; i < 10; i--)
B)
printf("%d", i);
while (i <= 10)
{
printf("%d", i);
if (i = = 3)
continue;
if (i = = 6)
break;
i++;
}
C)
do
{
printf("%d", i);
if (i = = 3)
continue;
if (i = = 6)
break;
i++;
}while (i <= 10);
D)
D)
while (i <= 10)
{
printf("%d", i);
if (i = = 6)
continue;
if (i = = 3)
break;
i++;
}
1.5 Which of the following is the correct way to define a
self-referential structure named ‘test’?
A)
A)
struct test
{
int a;
struct test p;
};
B)
struct test
{
int a;
struct test *p;
};
C)
struct test
struct test
{
int a;
}*t;
D)
struct *test
{
int a;
struct test p;
};
1.6 What is the output of the following code segment?
void fn()
{
int a = 10;
static int b = 20;
printf("a = %d b = %d ", ++a, ++b);
}
int main()
{
fn();
fn();
return 0;
}
A) a = 11 b = 21 a = 11 b = 21
B) a = 11 b = 21 a = 12 b = 21
C) a = 11 b = 21 a = 11 b = 22
D) a = 11 b = 21 a = 12 b = 22
B) a = 11 b = 21 a = 12 b = 21
C) a = 11 b = 21 a = 11 b = 22
D) a = 11 b = 21 a = 12 b = 22
1.7 Consider a structure defined as follows:
struct student
{
int rollNo, marks;
char name[30], course[30];
} s, *sp;
Which of the following is the correct way to
access the members of the structure?
A) sp.marks
B) sp -> rollNo
C) student.course
D) s -> name
1.8 Which of the following statements will not dynamically allocate space to store 10 integers?
A) int a[10];
B) int *p = (int *) malloc(10 * sizeof(int));
C) int *p = (int *) calloc(10, sizeof(int));
D) none of the above
1.9 What will be the output of the following code segment?
A) sp.marks
B) sp -> rollNo
C) student.course
D) s -> name
1.8 Which of the following statements will not dynamically allocate space to store 10 integers?
A) int a[10];
B) int *p = (int *) malloc(10 * sizeof(int));
C) int *p = (int *) calloc(10, sizeof(int));
D) none of the above
1.9 What will be the output of the following code segment?
int a = 100, b = 74;
if (a++ > 100 && b++ > 200)
printf("High values with a = %d b = %d\n", a, b);
if (a++ < 100 || b++ < 200)
printf("Low values with a = %d b = %d\n", a, b);
A) High values with a = 101 b = 74
B) Low values with a = 102 b = 75
C) High values with a = 102 b = 75
D) Low values with a = 101 b = 74
B) Low values with a = 102 b = 75
C) High values with a = 102 b = 75
D) Low values with a = 101 b = 74
1.10 Which of the following can be used as a variable name?
A) no of students
B) char
C) 7th
D) myName
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 Comments in the program make debugging of the
program easier. TRUE
2.2 There is no difference between '\0' and '0'. FALSE
2.3 The fprintf() function can be used to display the output on the screen. TRUE
2.4 A float constant cannot be used as a case constant in a switch statement.
2.5 The statement void p; is valid.FALSE
2.6 while (0); is an infinite loop. FALSE
2.7 If char *p = "Structured Programming", then p[5] is 'c'. TRUE
2.8 A function can have any number of return statements. FALSE
2.9 In a union, space is allocated to every member individually. FALSE
2.10 An algorithm is a graphical representation of the logic of a program. FALSE
2.3 The fprintf() function can be used to display the output on the screen. TRUE
2.4 A float constant cannot be used as a case constant in a switch statement.
2.5 The statement void p; is valid.FALSE
2.6 while (0); is an infinite loop. FALSE
2.7 If char *p = "Structured Programming", then p[5] is 'c'. TRUE
2.8 A function can have any number of return statements. FALSE
2.9 In a union, space is allocated to every member individually. FALSE
2.10 An algorithm is a graphical representation of the logic of a program. 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. ++x
B. Node points to the next
C. test(a, test(a + b))
D. remove()
E. fscanf()
F. ~
G. fn(&a)
H. (float)
I. --m
J. main()
K. delete()
L. strcmp(str1, str2)
M. fn(a)
|
3.1 A necessary function J
3.2 Pre-decrement I
3.3 Typecasting H
3.4 Call by reference G
3.5 Linked list B
3.6 Recursion C
3.7 Bitwise operator F
3.8 Removes dynamically allocated space K
3.9 Function to read the contents of a file E
3.10 Comparing contents of two character
arrays str1 and str2 L
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. a+
B. stdin
C. sizeof(float)
D. '\0'
E. "\0"
F. (*p).name
G. fn(int q, char c)
H. register
I.
fn(12, 'n')
J. {}
K. logical
L. Header
M. relational |
4.1 A file can be opened for both reading and writing using _____A___ mode.
4.2 The preferred storage class if fast access is required for a variable is ____H____.
4.3 A function call for a function with the declaration void fn(int x, char c); is ____I___.
4.4 __ B______ is the file automatically connected to the keyboard for every program.
4.5 ___D____ is the character stored in the pointer value of the last node of a linked list.
4.6 The ___K____ operators are used to compare the values of integers.
4.7 If *pf is a pointer to float, then ++pf will increment its value by ____C____.
4.8 The brackets used to mark the boundaries of a block are ____J____.
4.9 Relevant ____L____ files have to be included in a program for library functions to work.
4.10 p -> name can be written as ____F____.
Dear Sir please update new old paper of o level.
ReplyDeleteOur website has comprehensive information about the Nielit o level syllabus for O level students.