You are here: Home > Competitive Exams
All posts from

nielit.gov.in O Level Course Programming & Problem Solving Through ‘C’ Language Question Paper 2017

Name of the Organisation : National Institute of Electronics & Information Technology
Examination : O Level Course
Document Type : Sample Question Paper
Year : 2017
Name of the Subject : Programming and Problem Solving Through ‘C’ Language

Website : http://beta.nielit.gov.in/content/january-2017
Download Sample Question Paper : https://www.pdfquestion.in/uploads/13047-Programme.pdf

Programming & Problem Solving Through ‘C’ Language Question Paper :

Duration : 03 Hours
Maximum Marks : 100
Code.No : M3-R4

Related / Similar Posts :
NIELIT O Level Course Programming & C Language Question Paper July 2019

Instructions for Candidate :
** Carefully read the instructions given on Question Paper, OMR Sheet and Answer Sheet.
** Question Paper is in Hindi and English language. Candidate can choose to answer in any one of the language (i.e., either Hindi or English)
** There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

** PART ONE is Objective type and carries 40 Marks. PART TWO is subjective type and carries 60 Marks.
** PART ONE is to be answered in the OMR ANSWER SHEET only, supplied with the question paper, as per the instructions contained therein. PART ONE is NOT to be answered in the answer book for PART TWO.

** Maximum time allotted for PART ONE is ONE HOUR. Answer book for PART TWO will be supplied at the table when the answer sheet for PART ONE is returned. However, candidates who complete PART ONE earlier than one hour, can collect the answer book for PART TWO immediately after handing over the answer sheet for PART ONE.

** Candidate cannot leave the examination hall/room without signing on the attendance sheet or handing over his Answer sheet to the invigilator. Failing in doing so, will amount to disqualification of Candidate in this Module/Paper.

** After receiving the instruction to open the booklet and before answering the questions, the candidate should ensure that the Question booklet is complete in all respect.

1. Which of the following software translates source code into object code?
A) Compiler
B) Interpreter
C) Assembler
D) None

2. Which one of the following is not a keyword in C language?
A) main
B) endl
C) float
D) switch

3. Identify the invalid character constant:
A) ‘\n’
B) ‘$’
C) ’12’
D) ‘p’

4. What is the binary number equivalent of the decimal number 12?
A) 1100
B) 1010
C) 1001
D) 1110

5. Determine the order of evaluation of operations within the expression A<B&&C||D>A
A) &&, ||, <, >
B) <, >, &&, ||
C) >, <, &&, ||
D) &&,<, >, ||

6. How many times the printf statement within the
while loop will be executed?
x=1;
while(x=0)
printf(“hello”);
A) 1
B) 0
C) infinite
D) 2

7. Find the output generated by the given
program.
#include <stdio.h.
void main()
{
printf(“Bre\nak”);
}
A) Break
B) Bre\nak
C) Break
D) None

8. Which of the following is not an iterative statement?
A) switch
B) while
C) do while
D) for

9. Identify the storage class with which & operator cannot be used.
A) register
B) static
C) extern
D) auto

10. Identify the invalid declaration:
A) int &p;
B) int *p[10];
C) int **p;
D) int *p[ ];

Each statement below is either TRUE or FALSE. Choose the most appropriate one and enter your choice in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1×10)
2.1 The expressions on the both sides of a logical operator are always evaluated.
2.2 exit() function is defined in stdio.h header file.
2.3 for( ; i<2; i++); statement will result in compilation error.
2.4 At the time of initialization of an array, dimension of the array need not to be specified.
2.5 Actual parameters are used at the time of function calling.
2.6 static storage class is used to make a variable global.
2.7 Array is passed to a function using ‘call by value’ method.
2.8 Pointers are used in a program to allocate memory before the program execution.
2.9 All the members of a union should be of same type.
2.10 The function strlen() computes the length of an argument string excluding the null character.

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. (1×10)
3.1 Symbol ‘=’ – A. used with function
3.2 Void – B. To terminate a loop
3.3 char *c[10]; – C. To declare global variable
3.4 calloc() – D. c is array of size 10 where each element is a pointer to character
3.5 char (*c)[10] – E. conio.h
3.6 Break – F. storage class
3.7 Return – G. c is a pointer pointing to string of size 10
3.8 Extern – H. A function does not return anything
3.9 clrscr() – I. an equality operator in C
3.10 call by reference – J. assignment operator

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Choose the most appropriate option, enter your choice in the “OMR” answer sheet supplied with he question paper, following instructions therein. (1×10)
4.1 ________ operator converts an expression to a specified type.
4.2 The conditional operator (?:) is a ________ operator.
4.3 Tool ________ is used for program design.
4.4 ________ statement is used for unconditional branching in C.
4.5 Input function ________ does not show the character read from the input device.
4.6 ________ is a derived data type.
4.7 Function isdigit() is defined in ________ header file.
4.8 By default, storage class of local variables is ________.
4.9 The output of 14 % 4 is ________.
4.10 The size of long integer data type is ________.

5. a) Write a function fnpow() in C to compute xy where x is float and y is integer. Function will return the result and takes x, y as arguments
b) Write a function fnmat() which takes matrix, m, n as arguments where matrix is of size mXn with m as rows and n as columns. Function should return the maximum and minimum elements of the matrix. Elements of matrix are of integer type.
c) Find the output of the following –
char p[] = “%d\n”;
p[1] = ‘c’;
printf(p, 65);
int k=40, *a;
a=&k;
(*a)++; k++;
printf(“\n k=%d”,k); (5+6+4)

6. a) Write a program using command line parameters to append one text file to another text file.
b) Write down one similarity and one dissimilarity between break and continue statements.
c) A programmer wants to use two variables session and info. Variable session can take three values (morning, afternoon, evening) only. Using variable info, the programmerwants to access information empname and empid of 30 employees. Name the appropriatedata type used for each variable session and info and declare the variables. (8+2+5)

7. a) Given array a[10][10] of integer where each integer takes 4 bytes. Given the base address of array a as 4000, find address of a[4][5] assuming array is stored as row-major order.
b) Write a file statement to place a file pointer (fp) at the beginning of the record number (say R), where record size is B bytes.
c) Differentiate between struct and union. When is union preferred over struct? Give one example for each. (5+3+7)

8. a) Write a program to create a stack of integers using link-list and display it.
b) What is macro? Define a macro to compute maximum of two arguments passed to it. (10+5)

9. a) Explain differences between:
i) Text file and binary file
ii) static and extern storage class
b) Write down the objective of following function:
void f1(char s[], char c)
{int i ,j ;
for(i=j=0; s[i] != `\0’; i++)
if (s[i]!=c) s[j++]=s[i];
s[ j ] = `\0’;
return;
}
c) Explain the meaning of following declarations:
i) int *p(char *a[])
ii) int *p(char *a, char *b)
iii) int (*p) (char *a)[] (++) (5+4+6)

1 Comment
Add a Comment
  1. A programmer wants to use two variables session and information. Variable session can take three values (morning, afternoon, evening) only. Using variable info, the programmer wants to access information empname and empid of 30 employees. Name the appropriate data type used for each variable session and info and declare the variables.

Leave a Reply

How to add comment : 1) Type your comment below. 2) Type your name. 3) Post comment.

www.pdfquestion.in © 2021

Contact Us   Privacy Policy   SiteMap