November 3, 2011

CS1261 OBJECT ORIENTED PROGRAMMING question papers Anna university APRIL/MAY 2008 question papers Download


B.E/B.Tech DEGREE EXAMINATION APRIL/MAY 2008
Fourth Semester                     
(Regulation 2004)
Electrical and Electronics Engineering

CS1261 OBJECT ORIENTED PROGRAMMING


Time: Three hours                                                    Maximum marks: 100
Answer ALL questions

PART A (10 x 2 =20 marks)

1. What are the benefits of inline functions over macros?

2. Check whether the following is correct. If correct what is the final value is assined to the irc variable.If there is an error what type of error it is const int& irc = 47; irc = -37;

3. During what instances a copy constructor is called?

4. What is the output of the following program?
Void duplicate (int& a, int& b, int& c)
{
a* = 2;
b* = 2;
c* = 2;
}
int main()
{
int x = 1, y = 3, z = 7;
duplicate (x, y, z);
Cout << "x =" << x <<", y=" << y << ",z =" << z;
return 0;
}

5. What are the various access levels supported by C++ classes?

6. What are the virtual functions? How do they differ from non-virtual member functions?

7. Write the output of the following program, if its correct? Otherwise indicate the error
class abc 1{
Public static void main (string args[]){
    char a = 'a' + 2;
    system.out.println (a);
    int i = 2;
    char c = 'a' + i;
    System.out.println (c);
  }
};

8. Write a Java program to count the number of strings and characters passed as command line arguments.

9. What is the difference between an abstract class and an interface in Java?

10. Draw the complete inheritance hierarchy of class applet.

PART B (5 x 16 = 80)

11 (a)   Describe the features of object oriented programming with suitable examples.(16)

(or)

(b) (i) Describe how memory is allocated and deallocated in C++ dynamically. How could you check whether memory allocation is successful?

(ii) What are default arguments? How are they defined and called?Give examples.

12.  (a)  (i) What are static members of a class? Give a typical use of static members and a program to illustrate their need and programming syntax. (8)

(ii)  Write a C++ program to insert line number in a file (8)

(or)

(b) Define a rectangle as class. Provide suitable members functions, constructors (atleast two overloaded definitions), destructor. Write a C++ program to illustrate creation of objects, member fuction access, access of objects through pointers. (16)
          

13 (a) Give an example to illustrate how inheritance provides reusability of code. What are inherited from a base class? Describe different types of inheritance with suitable examples and programming syntax.(16)

(or)

(b) Write a C++ program to define a vector as a class. Provide suitable constructors and members and Overload the operators +, [ ], << and >> suitably. (16)

14.  (a)  (i)  Write a comblete java program to find factorical of a number using recursive method.(10)

(ii)  Describe any six member functions of string class in Java. (6)

(or)

(b) Write a Java program to implement classes counter, Up counter and Down counter. Use suitable inheritance hierarchy. Equip the classes with suitable members. Write a test program.(16)



15.  (a) Describe the life cycle of a thread. Illustrate the ways of creating threads. Write a sample code to illustrate communication between threads. (16)

(or)

(b) Write a program that will display the name of a student and his/her roll number and the course in which he / she is studying. The courses available in the college are marked as CSE, ECE, EEE and the respective class strength are 80, 70 and 50. Define the following exceptions.
Invalid Branch Exception - If the specified branch is anything other than CSE, ECE and EEE.
Invalid Roll No Exception - If specified roll number is negative or exceeds the class strength
Nagative Roll No exception - If specified roll number is negative
Exceeds strength exception - If specified roll number exceeds the class strength
Define a suitable inheritance hierarchy.

FEEL USEFUL PLEASE GIVE +1

0 comments :

Post a Comment

Get Syllabus in your Mail

Labels

Accenture Admission Notice - 2010 Admission Notification Anna University Anna University Chennai Anna University Question Papers Anna University Trichy Apparel Technology and Management Aptitude Questions Arts and Science Colleges Biomedical Engineering C and CPP Ebooks Calicut University CBSE Question papers Civil Engineering Civil Service Exams Colleges in India Colleges Result Computer Science Engineering Core Jobs CS R2008 CSE CSIR NET EBooks Download ECE EEE EIE Electives Electrical and Electronics Engineering Electronics and communication Electronics and Instrumentation Engineering Engineering Engineering Colleges in Maharashtra Engineering Colleges in TamilNadu Engineering Admissions Engineering Colleges Engineering Colleges in Karnataka Engineering Jobs Engineering Syllabus Entrance Exam Dates Entrance Exam Results Entrance Examination Exam Time Table Experiencer First Year Syllabus Freshers Full Time Jobs Government jobs in india Hardware and Networking Jobs Hotel Management and Catering Technology IGNOU Information Technology INTEVIEW QUESTIONS IT Jobs JNTU Question Papers Jobs in Bangalore Jobs in Chennai Jobs in Coimbatore Jobs in Delhi Jobs in Hyderabad Jobs in India Jobs in Kerala Jobs in Noida Jobs in Tamilnadu Jobs in TATA Karnataka Educations Lab Manuals Mechanical Engineering Medical Colleges Placement Papers Plus 2 Preparation for exams Private Jobs in India Question Papers Question Papers Download Results Announcement Semester 1 Semester 2 Semester 3 Semester 4 Semester 5 Semester 6 Semester 7 Semester 8 Syllabus Syllabus Download Tamil Movie TCS Placement Papers Teaching Jobs TECH MAHINDRA Textile Technology Top colleges University Results UPSC VICEVESVARAYA TECHNOLOGICAL UNIVERSITY waec Walk-in Interview Web Designers

Followers

Archive

Anna university Engineering Syllabus

Earn Money From Online

Government jobs in india

Admission Notification

Total Pageviews

 

Privacy Policy
http://topengineeringcollegesintamilnadu.blogspot.com use third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.