Roll
No………..
Total
No. of Questions
: 07
B.Sc.(IT) (Sem.–1st)
PROGRAMMING IN C
Subject Code : BS-105
Paper ID :
[B0403]
Time
: 3
Hrs. Max. Marks:
60
INSTRUCTION TO
CANDIDATES :
1. SECTION-A is
COMPULSORY consisting of TEN
questions carrying TWO
marks each.
2. SECTION-B contains
SIX questions carrying TEN marks
each and students has
to attempt any
FOUR questions.
SECTION-A
l. Write
briefly :
a)
What do you mean by Identifiers and Keywords?
b)
Write a
program to shift
the entered number
by three bits
left and display the result.
c)
What are ternary operators? Give example.
d)
Differentiate between break and continue statements.
e)
What do you choose between while and for
loop?
f)
Can we store values and addresses in the same array? Explain.
g)
What are pointers? Write at least
two advantages of using pointers.
h)
Can we pass functions to other functions? If yes how?
i)
Write at least three advantages of functions.
j)
What are the different modes in which a file can be opened?
SECTION-B
2. (a) Explain various C operators.
(b)
Write a program to find the roots of a quadratic equation using switch
statement.
3. (a) Explain the different type of Data
types available in C.
(b)
Write a
program to reverse
a given number
and check whether
a given number is same as that of reversed.
4. (a) Differentiate between
call by value and call
by reference concept
of functions with an example.
(b)
Write a program to find the factorial of
a given number using concept of functions.
5. (a) Give the limitations of arrays.
(b)
How a string is stored in C?
(c) Write a C program for matrix
multiplication.
6.
(a) Write a
program to add
two numbers through
variables and their pointers.
(b)
Write a note on arithmetic operations with pointers.
(c)
Write note on dynamic memory allocation.
7. (a) Write a program to copy the contents
of one text file into another.
(b)
Write detailed note on I/O operations on
file.
0 comments:
Post a Comment
North India Campus