Sunday 7 February 2021

Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2020 | NIELIT O Level


Solved : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , Jan 20

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein.

1.1 : What is the following is invalid header file in C ?
         (A) math.h (B) mathio.h
         (C) string.h (D) ctype.h

1.2 : Which of the following is not a keyword of 'C' ?
   (A) auto (B) case
   (C) break (D) function

1.3 : Strings are character arrays it always ends with _.
  (A) \n (B) \t
  (C) \0 (D) \1

1.4 : Find an integer constant
 (A) 3.145
 (B) 34
 (C) "125"
 (D) None of the above

1.5 : Standard ANSI C recognizes ______ number of keywords.
 (A) 16 (B) 32
 (C) 64 (D) 128

1.6 : Which is the only function that all C program must contain?
  (A) start() (B) system()
  (C) main() (D) scanf()

1.7 : Find output of the following program #include<stdio.h>
#include<conio.h> void main()
{
  char a[] = { 'A', 'B', 'C', 'D' };
  char* ppp = &a[0];
  *ppp++;
  printf("%c %c ", *++ppp, --*ppp);
}
(A) C A (B) C B
(C) B C (D) B A

1.8 : Find output of the following program #include  <stdio.h> #include<conio.h>
void main()
{
  char ch; int i;
  ch = 'G';
  i = ch-'A'; printf("%d", i);
}
(A) 5 (B) 6
(C) 7 (D) 8

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 is not a proper storage class in 'C'?
  (A) auto (B) dec
  (C) static (D) extern

 

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=10)

2.1 In C, upper and lower cases letter are same.
2.2 = is used for comparison, whereas, == is used for assignment of two quantities.
2.3 A function can be defined inside another function.
2.4 In switch statement, the default case is optional.
2.5 strlen() function counts the number of characters in a given string and returns the integer value.
2.6 The continue statement cannot be used with switch statement.
2.7 The basic meaning of the C keywords can be changed.
2.8 Functions can be called either by value or reference.
2.9 The ++ operator increments the operand by 1, whereas, the -- operator decrements it by 1.
2.10 #define lines should end with a semicolon.

Answer


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)

X

Y

3.1

It is an unconditional jump statement.

A.

Exit controlled loop

3.2

Function that concatenate strings.

B.

Shift Left

3.3

It is used to link the related expression

together.

C.

sizeof

3.4

Symbol '='

D.

Character test function

3.5

getw()

E.

Entry controlled loop

3.6

int*p

F.

Declare a pointer

3.7

While

G.

Assignment operator

3.8

isalpha()

H.

Comma

3.9

do….while

I.

strcat()

3.10

<< 

J.

goto

 

 

K.

Read an integer from a file

 

 

L.

Declare an array

 

 

M.

strlen()


Answer

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.

A.

Newline

B.

Increment

C.

sizeof

D.

Overlooking

E.

Bell

F.

math.h

G.

Dot

H.

Structured

I.

islower()

J.

And

K.

Union

L.

Link

M.

&&

 

 

 

 



4.1 : C language was implemented at the __________ laboratories.
4.2 C language is well suited for __________ programming.
4.3 The operator "++'' is known as __________ operator.
4.4 The __________ operator can be used to determine the length of array and structures.
4.5 The standard mathematical functions are included in the __________ header file.
4.6 The ________ section provides instruction to the compiler to link functions from system
library.
4.7 The ________ operator is true only when both the operands are true.
4.8 __________operator is used to connect structure name to its member name.
4.9 __________ function checks whether the entered alphabets are lower case letter or not.
4.10 ______is a character used to represent the end of a line of text and the beginning of a new
line.


Part Two
(Answer any FOUR questions)



(7+8)
6.

                                                                                                                                                          (7+8)

7.


(5+5+5)

8.


No comments:

Post a Comment