SCA8C11 November
2012
PROGRAMMING WITH C
(For those who joined in July 2008 and after)
Time : Three hours Maximum
: 75 marks
SECTION A – (10 x 1 = 10 marks)
Answer ALL questions.
Choose the correct
answer:
11.
__________ operators are used to compare two
values.
(a)
Arithmetic (b)
Relational (c) Ternary (d) Assignment Ans.: (b)
22.
++ is ______________ operator.
(a)
Arithmetic (b)
Relational (c) Logical (d) Unary Ans.: (d)
33.
___________ is a definite repetition loop where
the programmer knows the time of execution.
(a)
While (b)
If (c) For (d) Nested if Ans.: (a)
44.
__________ function is used to find the length
of the string.
(a)
Strln() (b)
Str() (c)
Strlen() (d) Strlength() Ans.: (c)
55.
The function which calls another function is
termed as ____________.
(a)
Called function (b)
Calling function (c) Function
prototype (d) Function model
Ans.: (a)
66.
_____________ is a collection of elements of
different data types.
(a)
Array (b)
Pointer (c) Structure (d) Function Ans.: (c)
77.
What are the two operators associated with
pointer?
(a)
! and * (b)
* and @ (c) & and * (d) & and ! Ans.: (c)
88.
fopen() function conations ___________
parameters.
(a)
2 (b)
3 (c) 4 (d) 5 Ans.: (a)
99.
____________ is a bit wise or operator.
(a)
& (b)
| (c) ^ (d) ~ Ans.: (d)
110.
___________ function is used to set the graphics
mode
(a)
Scanf() (b)
Setgraphics() (c) Initgraph() (d) Initgm() Ans..: (b)
SECTION B – (5 x 7 = 35 marks)
Answer
ALL questions, choosing either (a) or (b)
111. (a) Write short notes on : (4 + 3)
(i)
History of C.
(ii)
Defining symbolic constants.
Or
(b)
Explain the general syntax of “Switch” statement
with an example.
112.
(a) Write a C program to perform addition of two
given matrices.
Or
(b)
Explain any THREE string Handling functions with
examples.
113.
(a) Discuss about Nesting of functions with
suitable example.
Or
(b)Explain arrays within structures
with example.
114.
(a) Explain Pointer Expressions with examples.
Or
(b)
Write a C program to illustrate the use of
command line arguments.
115.
(a) Explain about Keyboard Basics.
Or
(b)Explain
operations on Bits with examples.
SECTION C – (3 x 10 = 30 marks)
Answer any THREE questions.
116.
Explain the use of ?: operator with an example C
program.
117.
Describe the use of multidimensional arrays in C
with examples.
118.
Compare structures with Unions.
119.
Explain the general syntax of fopen() and
fclose() functions with suitable illustrations.
220.
Write a C program to draw a pie chart to show
the sales details of 4 salesman as given in the table.
Salesman No. Sales
(Rupees in Lakhs)
1
200
2
670
3
550
4
750
_______________________