FACULTY OF ENGINEERING & INFORMATICS
B.E. I Year (New) (Common to all Branches) (Main) Examination, June 2011
Programming in C & C++
Time : 3 Hours ] 1: Max. Marks : 75
--- Content provided by FirstRanker.com ---
Note Answer all questions from Part A, answer any five questions from Part B.PART ? A (25 Marks)
1. Define function. Explain characteristics of function. 3
2. Differentiate between local & global variable. 2
3.? Define Array.
--- Content provided by FirstRanker.com ---
4. Write a program to calculate,c0be of a number by, using pointers.5. What are the various pre-processor commands ?
6. What is copy constructor ?
7. Explain the meaning of base class and derived class.
8. What is the output of the following ?
--- Content provided by FirstRanker.com ---
#incluclemain 0
unsigned int xr ;
x=128,y.32;
x x?1 ;
--- Content provided by FirstRanker.com ---
printf ( "After right shifting by lx.%d", x); y y?2 ;printf ("After left - shifting by 2y.?--%d", y);
Explain string handling Library functions'. 3
10. Define friend function. 2
PART ? B (50 Marks)
--- Content provided by FirstRanker.com ---
11. (ay Explain the various loops with simple program. 5(b) Write a program to find the sum of the following : 5
.4 X
2
X
--- Content provided by FirstRanker.com ---
4X
6
cos X 1
--- Content provided by FirstRanker.com ---
2 I 4 I ? 6 I12. (a) Explain with a program the different parameter passing
techniques. 5
(b) Write a program for binary search using function. 5
(This paper contains 2 pages) 1 P.T.O.
--- Content provided by FirstRanker.com ---
23
2
2
3
--- Content provided by FirstRanker.com ---
3FirstRanker.com - FirstRanker's Choice
Code No. : 3316/N
FACULTY OF ENGINEERING & INFORMATICS
B.E. I Year (New) (Common to all Branches) (Main) Examination, June 2011
--- Content provided by FirstRanker.com ---
Programming in C & C++Time : 3 Hours ] 1: Max. Marks : 75
Note Answer all questions from Part A, answer any five questions from Part B.
PART ? A (25 Marks)
1. Define function. Explain characteristics of function. 3
--- Content provided by FirstRanker.com ---
2. Differentiate between local & global variable. 23.? Define Array.
4. Write a program to calculate,c0be of a number by, using pointers.
5. What are the various pre-processor commands ?
6. What is copy constructor ?
--- Content provided by FirstRanker.com ---
7. Explain the meaning of base class and derived class.8. What is the output of the following ?
#inclucle
main 0
unsigned int xr ;
--- Content provided by FirstRanker.com ---
x=128,y.32;x x?1 ;
printf ( "After right shifting by lx.%d", x); y y?2 ;
printf ("After left - shifting by 2y.?--%d", y);
Explain string handling Library functions'. 3
--- Content provided by FirstRanker.com ---
10. Define friend function. 2PART ? B (50 Marks)
11. (ay Explain the various loops with simple program. 5
(b) Write a program to find the sum of the following : 5
.4 X
--- Content provided by FirstRanker.com ---
2X
4
X
6
--- Content provided by FirstRanker.com ---
cos X 1
2 I 4 I ? 6 I
12. (a) Explain with a program the different parameter passing
techniques. 5
--- Content provided by FirstRanker.com ---
(b) Write a program for binary search using function. 5(This paper contains 2 pages) 1 P.T.O.
2
3
2
--- Content provided by FirstRanker.com ---
23
3
Code No. : 3316/N
13.
--- Content provided by FirstRanker.com ---
(a)List the operations performed on pointer variable.
5
) Write a program to find the matrix multiplication using pointers.
5
--- Content provided by FirstRanker.com ---
, ,1 'Create a structure to specify data of customers in a bank. The
data to be stored is :Account number, Name, Balance in account.
Assume maximum of , 50 customers in the bank. (a) Write a
function to print _account number and name,of each customer with
--- Content provided by FirstRanker.com ---
VON -',' ;':',
:
,
balance below Rs. 1000.
--- Content provided by FirstRanker.com ---
6(b) Differentiate between structure and union.
4
it. (a) Explain the advantages of object oriented prOgramming.
4
--- Content provided by FirstRanker.com ---
(b) Explain constructor with a program.6 .
. (a) Write a prograM to overload operator.
(b) Explain various, types of inheritances.
Write short notes on the following :
--- Content provided by FirstRanker.com ---
? '(a) Function templates (b) Virtual function (c) Stream.3+4+3
r;
f
2
--- Content provided by FirstRanker.com ---
5,900FirstRanker.com - FirstRanker's Choice