How To Exam?

a knowledge trading engine...


B.E-B.E Electronics and Communication Engineering Object Oriented Programming(Sathyabama University, Chennai, Tamil Nadu-2011)

Monday, 19 August 2013 12:38Duraimani
SATHYABAMA UNIVERSITY
(Established under section 3 of UGC Act,1956)
Course & Branch :B.E - P-ECE/P-EEE
Title of the Paper :Object Oriented Programming        Max. Marks:80
Sub. Code :6CPT0026(2007-08-09-2010)                     Time : 3 Hours
Date :19/11/2011                                                            Session :FN
                                     PART - A                    (10 x 2 = 20)
                        Answer ALL the Questions  
1.     Enlist some of the limitations of Structured Programming.
2.     Identify some of the compilers available for C++.
3.     Write a C++ program to find the XOR result of any two hexadecimal operands.
4.     What are preprocessor directives?
5.     Define nested structures with an example.
6.     Mention the usage of scope resolution operator.
7.     Differentiate Function Overloading and Function Overriding.
8.     What are Inline functions?
9.     What are static functions?
10.   Define Garbage Collection.

PART – B                       (5 x 12 = 60)
Answer All the Questions
11.   Write a logical valued function which takes an integer parameter and returns “TRUE” if and only if the integer is a prime number between 1 and 1000. Test your function by calling it from an appropriate driver program with different inputs.
(or)
12.   Write a program which prints a table listing the number of the occurrences of the lowercase letters a to z in a given text.
13.   Write a function that normally takes one argument, the address of a string and prints that string once. However if a second type int argument is provided and is nonzero, the function should print the string a number of times equal to the number of times that the function has been called at that point.
(or)
14.   Implement the following algorithm in C++
            Get values for integers A1,A2…..A20
Set the value of smallest so far to A1.
Set the value of location to 1
Set the value of I to 2
While i<=20
If Ai < smallest so far then
Set smallest so far to Ai
Set location to i
Add 1 to the value of i
End of the loop
Print out the values of the smallest so far and location
stop
15. Create a class describing a resistor with the following members:
A private data member for the resistance R.
A public member function to set the value of R.
A public member function to calculate the current I from the voltage E.
A public member function to calculate the voltage E from current I.
A public member function to calculate the power dissipation P from the current I using the formula P=I.E , where I is calculated using the previous member function.
(or)
16.   Write a function called reverseit( ) that reverses a String, Use for loop that swaps the first two characters, then the second and next to last characters and so on. The string should be passed as an argument to reverseit( ). The program should get a string from the user, call reverseit( ) and print out the result. Explain overloaded functions with an example.
17.   Create a ‘Circle’ class with a member function which displays the diameter, circumference and area. Inherit a sphere class from the circle class which also has a method to compute the volume.
(or)
18.   Create a simple list of characters using pointers with the following functionalities
            Addition/Appending of a new character.
Deletion of a character.
Insertion of a new character at any specified position.
19.   Explain friend functions with an example.
(or)
20.   Explain the use of ‘this’ pointer with an example. 
( 0 Votes )

Add comment


Security code
Refresh

Earning:  ₹ 4.45/-
You are here: PAPER B.E-B.E Electronics and Communication Engineering Object Oriented Programming(Sathyabama University, Chennai, Tamil Nadu-2011)