S.B. Roll
no. __________
COMPUTER PROGRAMMING USING C
3rd Exam/Comp/6244/May’08
Duration: 3
hrs
Section –A
1.
Fill in the blanks:
a.
In ‘C’ integer division results in truncation.
b.
In a ‘Ç’ program , constant is defined before
main.
c.
In a for loop, if the condition is missing, then
it is assumed to be present and taken to be true.
d.
If a =9, b=5 and c=3, then the expression
(a-a/b*b%c)>a%b%c evaluates to false.
e.
If a ‘switch’ feature is used, then default
case, if used, can be placed anywhere.
f.
The statement printf(“%d”, ++S); prints 6
g.
Individual members can be initialized within a
structure type declaration.
h.
Void can be used in an expression.
Note: Attempt
any five questions.
2.
a.
What is the output of the following program
Main
()
{
Int
a =4;
Change
(a);
Printf(“%d,k”a);
}
Change
(a)
Int
a;
{printf
(“%d”, ++a);?
b.
Draw a flow chart for finding the biggest number
form among a given list of number.
c.
What is available? How are the variables named
and declared in ‘C’ language?
d.
Explain any two string handling functions in
‘C’.
e. What is a structure? How is it different form an
array? How are they defined and initialized? Explain with example.
f.
State advantages and di9sadvantages of pointers.
g.
Explain how a file is opened and closed.
Section –C
3.
Write a program to find the factorial of a given
integer and use it to find. nCr
Or
Describe the various I/O statements and
assignments statements in ‘C’ languages. Also discuss the various data types
used.
4.
Write the program for the following
a.
To list all the number which are divisible by 2
in an array of ‘n’ integers.
b.
To search an element in an array of ‘n’
elements.
c.
To find the sum of odd even number in a given
list of values.
Or
Write short
note on
a.
Call by value and call by reference
b.
Steps in development of a program
c.
Break and switch statements.
0 comments:
Post a Comment
North India Campus