How To Exam?

a knowledge trading engine...


University of Rajasthan 2008 B.Tech Information Technology Object Oriented Programming - exam paper

Friday, 01 February 2013 04:35Web
}
cout<<"\nout when x became" < return 0;
}//end function main
(2) #include
using std::cout;
using std:: endl;
int main()
{
int counter=1;
do {
cout< } while(++counter<=10);
cout< return 0;
} // end function main

(3) #include
using std::cout;
using :: endl;
int main()
{
for(int x==1; x<=10; x++)
{ if(x==4) continue;
cout< }
cout< return 0;
} [2+3+3]

[8]
(b) obtain the errors in the subsequent code fragment and discuss how to accurate the errors:
(1) x=1;
while(x<=10)
x++;
}
(2) for(y=0.1; y!-1.0; y+=0.1)
cout<
(3) switch (n) {
case 1:
cout<<”The number is 1”< case 2:
cout<<”The number is one or 2”< break;
}

(4) The subsequent code should print the values one to 10
n=1;
while(n<10)
cout< [2+3+3]
UNIT III


3 ans the subsequent ques. in maximum of 5 lines:
(1) What is a friend function?
(2) What is the advantage and disadvantage of friend functions?
(3) What is virtual class and virtual function?
(4) What is meant by Run time kind Casting and Dynamic Casting?
(5) elaborate Namespaces?
(6) elaborate the scope rules for nested classes?
(7) elaborate exceptions and what is meant by exception handling?
(8) What is a template?
[2*8]


OR

3 ans the subsequent ques. in maximum of ten lines:
(1) Distinguish ranging from static binding and dynamic binding. discuss the use of virtual function and the vtable in dynamic binding.
(2) Distinguish ranging from virtual functions and pure virtual functions.
(3) explain the relative merits of using protected access v/s private access in the base class.
(4) What is the relationship ranging from functions templates and overloading?

UNIT IV

4 What is the difference ranging from the subsequent in JAVA?
(1) Static class, Public class, and class with any keyword. and Static data member
(2) Static function and public function and public static function.
(3) Keyword Implements and keyword Extends
(4) Abstract classes and Concrete classes.
provide 1 example in every case to illustrate the difference 2*4+2*4=16
OR

4 (a) What is meant by function overriding in JAVA? How is it various from function overloading? provide example of every case
(b) discuss the effect of using the keyword final with a class definition?
(c) Under what circumstances the keyword super is used in JAVA? discuss with an example.
(d) How objects are created in JAVA? discuss the use of constructor in JAVA. 4*4




5 (a) How classes in a package are organizes in JAVA. discuss with an example. Draw the class tree and the directory tree of the package.
(b) What is JAVA applet? How is it various from a JAVA program? discuss. [8]

OR

5 obtain output of the subsequent program
(a) public class StringMiscellaneous
{ public static void main(String args[])
{
String s1=”hello there”
char charArray[]=new char[5];
System.out.printf(“\n Length of s1:%d”, s1.Length()) System.out.print(“\n The string reversed is “);
for(int Count – s1.length()-1; count>=0; count--)
System.out.printf(“%s”, s l.charAt(count));
s1:getChars(0, 50 ,charArray);
System.out.print(character);
System.out.println();
}//end main
} //end class StringMiscellaneous
(b) public class StringBufferCapLen
{
public static void main(String args[])
{
StringBuffer buffer= new StringBuffer(“Hello, how are you?”);
System.out.print(“buffer=%s\nlength=%d\ncapacity=%d\n\n”, buffer.toString(), buffer.length(), buffer.capacity() );
buffer.ensure Capacity(75);
System.out.printf(“New capacity=%d\n\n” Buffer.capacity());
buffer.length(), buffer.to String());
}//end main
}//end class StringBufferCapLen









( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER University of Rajasthan 2008 B.Tech Information Technology Object Oriented Programming - exam paper