Thursday, March 1, 2018

M3-R4: JULY, 2012, 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 Which of the following is not an unconditional control statement in ‘C’?
A) break
B) continue
C) exit()
D) while

1.2 What will be the output of the following program?
Main()
{ int x = 5;
While ( x = = 1)
x = x -1;
printf ( “ %d\n”, x);
}
A) 5
B) 4
C) 0
D) syntax error

1.3 Which of the following is not a proper storage class in ‘C’?
A) auto
B) dec
C) static
D) extern

1.4 Which of the following is a wrong pointer declaration?
A) int *int(a);
B) int *x, *y;
C) float *aptr;
D) int *x, float *y;


1.5 The value of S[5] in the segment char s[15] = “ MICROPROCESSOR” is
A) P
B) O
C) R
D) None of the above

1.6 Function putchar() displays
A) one word at a time on the screen
B) one character at a time
C) result on the screen
D) None of the above

1.7 The sqrt() function is available in
A) conio.h
B) string.h
C) math.h
D) graphic.h

1.8 If ‘a’ is an integer variable, then a = 5/2 will return a value
A) 2.5
B) 2
C) 2.000000
D) 2.500000

1.9 Which of the following a not a basic data type used in C language?
A) double
B) float
C) char
D) array

1.10 pow(x,y) is used to
A) power of yx
B) power of xy
C) logarithm of x on the base y
D) Such function does not exist

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 A break statement is used to exit from a statement block in a switch statement.TRUE
2.2 Recursion cannot call a function itself. FALSE
2.3 An array is a group of related data item that share a common memory location in RAM. FALSE
2.4 In the declaration int(*p)() p is a pointer to a function that returns an integer. FALSE
2.5 If m = 5, ++m + ++m is equal to 12. FALSE
2.6 The memory required in structure is less than union. FALSE
2.7 A function in ‘C’ must have at least one argument. FALSE
2.8 The programming language happens to be the high level language with some assembly
language features. FALSE
2.9 In C functions the actual expressions / parameters are passed on to formal parameters
using the method of call by value result. TRUE
2.10 In C the graphics may be used to add graphical features to the program. 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. Increase or decrease of pointer value
B. derived data type
C. Termination of a program
D. Converts a data type to another data type
E. User define data type
F. Initializes the pointer
G. f=(X < 0)? 0 : 1
H. ferror()
I. Perform operations in string
J. Take printout in special format
K. ‘a’ is a single character constant and
“a” is a string character constant
L. When the values of the condition is true
M. Bitwise operator.

3.1 exit(0) in a ‘C’ program represents  C
3.2 The difference in ‘a’ and “a” is  K
3.3 pointer arithmetic refers to  A
3.4 int *mptr, m=25; mptr=&m performs  F
3.5 Function that detects error in file accessing  H
3.6 Array is a  B
3.7 The statement block in while is executed  L
3.8 Typecasting  D
3.9 Formatted print is used to  J
3.10 string.h is used to  I

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. static B. calloc() C. main()
D. char E. free() F. Right to left
G. Close and disconnect
the file from
H. Left to right I. register
J. atoi() K. putpanel() L. stdin
M. stdout

4.1 ____J____ is the function to convert a ASCII character into an integer.
4.2 In C an array of character is known as ____D____.
4.3 The line from which a program execution begins is ____C____.
4.4 ____E____ function is used to release the memory allotted in dynamic memory allocation.
4.5 The dynamic memory allocation function are ____B____ and malloc().
4.6 p++ has associativity ____H____.
4.7 The use of ____G____ is considered unstructured programming.
4.8 The storage class ____A____ has global visibility.
4.9 The standard file, in ‘C’, ____M____ is connected to screen.
4.10 ____K____ is used to draw a point on the monitor screen in given coordinate position.


No comments:

Post a Comment