Thursday, March 1, 2018

M3-R4: JANUARY, 2013, DOEACC O LEVEL, C LANGUAGE PROGRAMMING ANSWER, CONDUCTED BY NIELIT.

"Olevel 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 If a=8, b=3 and c=-5 are integers, then value of a*b/c is
A) -4
B) -2.8
C) +2.8
D) +3

1.2 Which of the following is a valid identifier?
A) 1return
B) return1
C) return
D) $return_1

1.3 Which of the following is a valid string constant?
A) “programming”
B) “programming
C) ‘programming
D) $ programming $

1.4 How will you free the allocated memory?
A) remove(var-name);
B) free(var-name);
C) delete(var-name);
D) dalloc(var-name);

1.5 If i = 8 and j = 5 are two integers, then the value of (i>0) || (j < 5) is
A) -5
B) 1
C) 0
D) +5

1.6 How many times "INDIA" will get printed?
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("INDIA");
}
return 0;
}
A) Infinite times
B) 11 times
C) 0 times
D) 10 times

1.7 A group of related data that share a common name is
A) Pointer
B) Array
C) Function
D) None of the above

1.8 In ‘C’, if you pass an array as an argument to a function, what actually gets passed?
A) Value of elements in array
B) First element of the array
C) Base address of the array
D) Address of the last element of array

1.9 What does fp point to in the program?
#include<stdio.h>
int main()
{
FILE *fp;
fp=fopen("trial", "r");
return 0;
}
A) The first character in the file
B) A structure which contains a char pointer which points to the first character of a file
C) The name of the file
D) The last character in the file

1.10 Which of the following language is predecessor to ‘C’ Programming Language?
A) A
B) B
C) ADA
D) C++

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and
ENTER in the “tear-off” sheet attached to the question paper, following instructions
therein. (1x10)

2.1 Sizes of short integer and long integer would vary from one platform to another.  FALSE
2.2 A structure can contain similar or dissimilar elements.  TRUE
2.3 Names of functions in two different files linked together must be unique.  TRUE
2.4 Functions that do not contain return statement do not return any value.  TRUE
2.5 malloc() allocates memory from the heap and not from the stack.  TRUE
2.6 Every ‘if’ statement must also include ‘else’.  FALSE
2.7 The three declarations char **apple, char *apple[], and char apple[][] are same.  FALSE
2.8 malloc() returns a float pointer if memory is allocated for storing float's and a double pointer if memory is allocated for storing double's.  TRUE
2.9 If we have to execute the program with different set of inputs, we need to recompile the program each time.  TRUE
2.10 Compiler translates the of source code into object code before the program can be executed.  TRUE

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 “tear-off” answer sheet
attached to the question paper, following instructions therein. (1x10)

A. menu selection
B. logical operators
C. stdio.h
D. stdlib.h
E. 4,8
F. integer value
G. strcat()
H. dynamic data structure
I. strcmp()
J. argument
K. ftell()
L. pointer
M. linked list

3.1 Used when we want to test more than one condition and make decision  B
3.2 Size of float and double in bytes   E
3.3 A linked list is a   H
3.4 The switch statement is often used for   A
3.5 Input/output function prototypes and macros are defined in  C
3.6 Gives the current position in the file   K
3.7 Header file should be included to use malloc() function  D
3.8 A piece of information passed to a method   J
3.9 By default functions return   F
3.10 To concatenate two strings we use   G

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 “tear-off” answer sheet attached to the question paper,
following instructions therein. (1x10)

A. header B. garbage C. alloc
D. goto E. void F. double quotes
G. Flowchart H. deallocate I. return
J. logical K. 1972 L. ->
M. conditional

4.1 ____D____ breaks the normal sequential execution of the program.
4.2 Character constants should be enclosed between ____F____.
4.3 The operator && is an example for ____J____ operator.
4.4 Pictorial representation of an algorithm is ____G____.
4.5 A pointer contains ____B____ until it is initialized.
4.6 If a function return type is declared as ____E____ it cannot return any value.
4.7 The ____L____ operator can be used to access structures elements using a pointer to structure variable only.
4.8 The keyword used to transfer control from a function back to the calling function is ____I____.
4.9 NULL macro is defined in ____A____ file.
4.10 ____C____ function is used to request memory space.

1 comment:

  1. Helpful web site for O level students but here is some mistakes in answers that you gave. So first correct them and then this site will be the best web site for O level sudents

    ReplyDelete