How To Exam?

a knowledge trading engine...


Punjab Technical University 2007 B.B.A PROGRAMMING IN C/C++ - Question Paper

Monday, 08 April 2013 01:50Web

Roll No...........................
Total No. of ques. : 13] [Total No. of Pages : 02
Paper ID [B0145]
(Please fill this Paper ID in OMR Sheet)
BBA (1002) (S05)(Sem. - 5th/6th)

PROGRAMMING IN C/C++
Time : 03 Hours Maximum Marks : 75
Instruction to Candidates:
1) part - A is Compulsory.
2) Attempt any 9 ques. from part - B.

part - A
Q1) (15 × two = 30)
a) What is structured and unstructured programming?
b) What is the purpose of break and continue on statements?
c) What is object-oriented programming?
d) discuss different logical operators in C/C++. Write them in order of
their precedence.
e) discuss the syntax and purpose of strcat( ) and strcpy( ) functions.
f) What is the difference ranging from = and = = operators?
g) discuss the difference ranging from ++a and a++.
h) What is recursion?
i) What do you think is the cause of an fault message “Misplaced else”?
j) What is the difference ranging from array and structures?
k) List a few of the illegal operations on pointers?
l) discuss the terms “default constructor” and “default argument
constructor”.
m) discuss the term “nesting of if-else”.
n) List any 2 advantages of cout and cin over printf and scanf.
o) What is the size of 1 single float kind of variable?
J-8029[S-9700446] P.T.O.
J-8029 [S-9700446] 2

part - B
(9 × five = 45)
Q2) What do you understand by the term “object-oriented programming”?
discuss the terms: Encapsulation, inheritance, abstraction, polymorphism?
Q3) Write a program to obtain out the factorial of a number using recursion.
Q4) Write a program to test whether the number entered from keyboard is
prime number or not.
Q5) provide and discuss the syntax of while-loop, do-while loop and for loop.
What is the difference ranging from while loop and do-while loop?
Q6) Write a program to add 2 matrices in C/C++.
Q7) Evaluate the subsequent expressions:
(a) two + three * five % nine – 6
(b) four * five – six * three % 2
(c) six >= six &&! (15 < 2)
(d) ! (15 >=2) ! (200)
(e) four + 5/2 – three + 6* seven % 8
Q8) Write a program to obtain the sum of 1st n natural numbers.
Q9) Write a program to compute the area and perimeter of rectangle taking care
that negative and zero values for length and width of rectangle are rejected
by the computer.
Q10) discuss the syntax of if-else statement. discuss the term “nesting of
if-else”.
Q11) elaborate pointers? discuss “call-by value” and “call by reference” with
examples.
Q12) Write short note on subsequent statements:
(a) return (b) switch (c) break (d) continue on
Q13) Write a program to obtain out the sum of n numbers inside the onedimensional
integer array.
??????


( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Punjab Technical University 2007 B.B.A PROGRAMMING IN C/C++ - Question Paper