punjabtechnicaluniversity.blogspot.in
Roll No. .................
Total No. of Questions : 13] [Total No. of Pages : 02
Paper ID [A0302]
(Please fill this Paper ID in OMR Sheet)
B.Sc. IT (102) (S05) (New / Old) (Sem. - 1st)
B.Sc. CST (402) (Old) / DCA (102) (New) / DCA
(103) (Old)
PROGRAMMING WITH C
Time : 03 Hours Maximum Marks : 75
Instruction to Candidates:
1) Section - A is Compulsory.
2) Attempt any Nine questions from Section - B.
Section - A
(15 x 2 = 30)
Q1)
a) What is the difference between an algorithm and flowchart?
b) How is executable program obtained from source program in C?
c) What is the working principle of conditional operator? Give
example.
d) What do you understand by the term coercion?
e) What is the significance of ‘\b’ and ‘\f’
escape sequences? Give example.
f) What is the difference between break and
continue statements in C?
g) What are different ways to initialize a two dimensional array?
Give
example.
h) What is the difference between subscript and subscripted
variable?
i) Differentiate between strlen(
) and sizeof(
) with suitable examples.
j) What is the role played by atoi( ) in string
manipulation? Give example.
k) What is the need of function prototyping?
l) Differentiate between structure and union.
m) What is typedef declaration? Give suitable example.
n) What are advantages of pointers?
o) Give syntax and application of extern storage
class?
Section - B
(9 x 5 = 45)
Q2) Write a program to swap two positive integer
numbers without using a third
variable but by using bitwise operators.
Q3) Explain basic data types available in C with
the help of example.
Q4) Write a short note on operator precedence and
associativity.
Q5) Explain briefly various character
input/output functions with examples.
Q6) Write a program to find that the number entered
by user is a palindrome or
not.
Q7) Compare all the three loops available in C.
Q8) Write a program to reverse a string making
use of strlen function.
Q9) Write a program in C to sort in ascending
order integer elements of onedimensional
array.
Q10)Differentiate between pass by value and pass
by reference with the help of
example.
Q11)Explain with the help of example the concept
of passing array to functions.
Q12)Explain by giving suitable example pointers
with structures.
Q13)Explain with example the relationship of one
dimensional array with pointers.
❈ ❈ ❈ ❈
0 comments:
Post a Comment
North India Campus