SASTRA University 2009 B.Tech Computer Science and Engineering 1st MIDTERM ,PROGRAMMING IN C++ - Question Paper
SASTRA UNIVERSITY
THANJAVUR
1ST YEAR B-TECH-1ST MID SEM EXAM-JAN12
SUBJECT:PROGRAMMING IN C++ MAX.MARKS:50
SUB CODE:CCS203 R01 DURATION:90MINS
GROUP:A
PART:A(10*2=20)
1. What is Objective Oriented Programming?
2. List the types of access specifiers.which access specifier is used as a default In a class definition?
3. What are the rules for a function to be inline?
4. Why do we pass object as a reference in copy constructor?
5. what is a class variable?Writer its significance?
6. write the output of the fallowing program
Void fun(inta,int b=5){cout<<a<<b;}
Void fun(int a){cout<<a;}
Void main()
{fun (8,7);fun(9);}
7. What is the purpose of const function?
8. What is the output of the fallowing:int x=6;const int &y=x;cout<<x++;cout<<y++;
9. How do you pass a const from mian fun to a class?
10. Define constructor?
PART:B(Answer all)
(3*10=30)
11. Write in detail about characteristics of OOPS?
12. Create a class for English distance{feets&inches}&si units (m,cm,mm) with appropriate data
members,member functions & constructors
13. Using polymorphism calculate apowern for different data types of a.For character data print the
character n times
Earning: Approval pending. |