nea (Be
Papert
oi
TT
Magadh Mahila College
Patna University, Patna
in -l)
CC-2 (Pro amining Technique ‘Cy Sime: 2 Hes
Choose the correct answer from the given options 5%1=5
marks
|, The operator which compares two values is
a) assignment
b) relational
c) unary
d) equal *
1. When we place a semicolon after the for statement,
a) the compiler will generate an error message
b) program runs infinite times
c) Loop executes infinite times
d) Loop executes based on the condition given
without executing the stements inside for loop
The function malloc() is defined in which header file |
a) stdio.h|
b) stdlib.h
c) conio.h
d) iostream.h
Vv. Which function is used to associate a file with a stream?
a) fread()
b) fopen()
c) fwrite()
d). fflush()
The preprocessor directives must be preceded by which
symbol?
a) &
b) &&
c) #
d) !2. Fillin the blanks
I. Character constants are quoted using...
NW The Statement is used to skip
statements ina loop.
The default storage class for v;
inside a block is
Stremp(str1, str2) returns 1 if :
Contains related information Of the same data type
3X 1=5 marks
ariables declared
V.
SECTION -B
3” Answer any two questions,
Each answer should not be more than 200 Words. 2X 5= 10
marks
3. Write a short note on basic data type:
s that C language supports.
4. Explain Left shift and right shi!
ft bitwise operator with examples.
5. What is recursion? Explain with an example.
6 Writeac Program to search a value specified bythe user, using
binary search.
SECTION — Cc’
Answer any three questions 3 X 10= 30 marks
7 Writeac Program to calcul;
equation,
8. Explain call by value and call by reference in Cwith suitable,
examples,
ate the roots of a quadratic
3. Write ac Program to print the Fibonacci seres up |
ton terms using user definedfunction,
107Write ac Program to sort an ar
11. Write ac Program to multiply ty
ray 10 elements
wo 3k 3 Matrices
tat
mfoert> — D 1
— OP el BW ait