KING'S IT WORLD
please register to watch content in detail
THANKS
ADMIN KINGSIT WORLD
KING'S IT WORLD
please register to watch content in detail
THANKS
ADMIN KINGSIT WORLD
KING'S IT WORLD
Would you like to react to this message? Create an account in a few clicks or log in to continue.

KING'S IT WORLD


 
HomeHome  GalleryGallery  SearchSearch  Latest imagesLatest images  RegisterRegister  Log inLog in  
Search
 
 

Display results as :
 
Rechercher Advanced Search
kings it world text ad
KINGSITWORLD CALENDAR
Follow me on G+
KINGSITWORLD WEATHER
Latest topics
» QURAN MAJEED KE TAFSEER
cs304 paper 2010 Icon_minitimeMon Aug 20, 2012 2:59 am by YOUSUFHALI

» PHY301 CIRCUIT THEORY REFERENCE BOOK
cs304 paper 2010 Icon_minitimeWed Jul 25, 2012 11:36 am by shabbir1915

» MTH202 ASSIGNMENT NO 3 SOLUVED
cs304 paper 2010 Icon_minitimeMon Jun 11, 2012 9:51 am by jaffarhussain

» Retrieve the DTC In the Jewel Module of 1995 Ford
cs304 paper 2010 Icon_minitimeThu May 31, 2012 11:51 am by obd2tool

» How you can Obvious the Check Engine Light on the
cs304 paper 2010 Icon_minitimeThu May 31, 2012 11:43 am by obd2tool

» send free sms and send free sms update on facebook
cs304 paper 2010 Icon_minitimeTue May 15, 2012 8:33 pm by rizwan269

» United Bank Limited (UBL) - Fee Deposit
cs304 paper 2010 Icon_minitimeThu May 10, 2012 3:33 pm by irumnaz

» PHOTO MIXER SOFTWARE
cs304 paper 2010 Icon_minitimeFri Apr 20, 2012 10:02 am by sacredwkb

» Entrepreneurship Survey
cs304 paper 2010 Icon_minitimeThu Mar 08, 2012 2:20 pm by Admin

» Fall 2011 Semester Result Announced
cs304 paper 2010 Icon_minitimeThu Mar 08, 2012 2:19 pm by Admin

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
kings it world text ad
Social bookmarking
Social bookmarking reddit      

Bookmark and share the address of KING'S IT WORLD on your social bookmarking website

Bookmark and share the address of KING'S IT WORLD on your social bookmarking website
visitors counter
cs304 paper 2010 Image
Powered by website analytics technology.
Keywords
final MGMT611 MGT502 2010 2011 HRM611 paper term assignment
kings it world text ad
FLAG COUNTER
free counters
LIVE TRAFFIC

 

 cs304 paper 2010

Go down 
AuthorMessage
Admin
Admin
Admin


Scorpio
Posts : 638
Points : 2155
Reputation : 19
Join date : 2010-05-15
Age : 36
Location : islamabad

cs304 paper 2010 Empty
PostSubject: cs304 paper 2010   cs304 paper 2010 Icon_minitimeThu May 27, 2010 9:57 pm

MIDTERM EXAMINATION
Spring 2010
CS304- Object Oriented Programming (Session - 2)



Question No: 1 ( Marks: 1 ) - Please choose one
Which part of an object exhibits its state?
► Data


► Operations

► Any public part

► Any private part


Question No: 2 ( Marks: 1 ) - Please choose one
Inheritance is a way to

► organize data.
► pass arguments to objects of classes.
► add features to existing classes without rewriting them.
► improve data-hiding and encapsulation.

Question No: 3 ( Marks: 1 ) - Please choose one
Suppose you have been given the following design,

"A person has a name, age, address and sex. You are designing a class to represent a type of person called a patient. This kind of person may be given a diagnosis, have a spouse and may be alive".
Given that the person class has already been created, what of the following would be appropriate to include when you design the patient class?
► registration date and diagnosis
► age and sex
► sex and diagnosis
► diagnosis and age

Question No: 4 ( Marks: 1 ) - Please choose one
What problem(s) may occur when we copy objects without using deep copy constructor?






► Dangling pointer
► Memory Leakage
► All of the given
► System crash

Question No: 5 ( Marks: 1 ) - Please choose one
this pointers are not accessible for static member functions.

► True
► False

Question No: 6 ( Marks: 1 ) - Please choose one
A static member function cannot be declared.

► Static
► Implicit
► Explicit
► Virtual

Question No: 7 ( Marks: 1 ) - Please choose one
_______ remain in memory even when all objects of a class have been destroyed.

► Static variables
► Instance variable
► Primitive variables
► None of given

Question No: 8 ( Marks: 1 ) - Please choose one
Friend functions are _____________ functions of a class.
► None of given
► object member
► non-member
► data member

Question No: 9 ( Marks: 1 ) - Please choose one
___________, which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A.






► Friendship is one way only
► Friendship is two way only
► NO Friendship between classes
► Any kind of friendship

Question No: 10 ( Marks: 1 ) - Please choose one
The statement objA=objB; will cause a compiler error if the objects are of different classes.

► True
► False

Question No: 11 ( Marks: 1 ) - Please choose one
Identify which of the following overloaded operator function’s declaration is appropriate for the given call?
Rational_number_1 + 2.325
Where Rational_number_1 is an object of user defined class Rational_number.

► Rational_number operator+( Rational_number & obj);
► Rational_number operator+(double& obj);
► Rational_number operator+(Rational_number &obj, double& num);
► operator+(double& obj);

Question No: 12 ( Marks: 1 ) - Please choose one
Which operator can not be overloaded?

► The relation operator ( >= )
► Assignment operator ( = )
► script operator ( [] )
► Conditional operator (? : )

Question No: 13 ( Marks: 1 ) - Please choose one
To convert from a user-defined class to a basic type, you would most likely use

► a built-in conversion operator.
► a one-argument constructor.
► an overloaded = operator.
► a conversion operator that’s a member of the class.

Question No: 14 ( Marks: 1 ) - Please choose one
The technique in which we visualize our programming problems according to real life’s problems is called
----------------
► structured programming
► object oriented Programming
► procedural programming
► non of the given

Question No: 15 ( Marks: 1 ) - Please choose one
In object orientated programming, a class of objects cans _____________ properties from another class of objects

► Utilize
► Borrow
► Inherit
► Adopt

Question No: 16 ( Marks: 1 ) - Please choose one
A C++ class is similar to --------------------

► Structure
► Header File
► Library File
► None of the given

Question No: 17 ( Marks: 2 )
Can we create an array of objects for a class having user defined constructor? Justify your answer.


Question No: 18 ( Marks: 2 )
Friend functions increase ‘Programming bugs’. What is your opinion?


Question No: 19 ( Marks: 2 )
Explain two benefits of setter functions.


Question No: 20 ( Marks: 3 )
What are binary operators? Give an example of binary operators overloading using any class.


Question No: 21 ( Marks: 3 )
Give c++ code to overload assignment operator for string class.

Question No: 22 ( Marks: 5 )
Writ c++ code to overload subscript[] operator for String class.


Question No: 23 ( Marks: 5 )
Detect and correct compile time error(s) in the following code.

class Exam
{
char *ExamName;
int No_of_paper;

public:
Exam()
{
ExamName = "Final Term";
No_of_paper = 5;
}

void setname( char* name) const
{
ExamName = name;
}
void setpaper(int paper) const
{
No_of_paper = paper;
}
char* getname()
{
return ExamName;
}
int getpaper()
{
return No_of_paper;
}
};

int main()
{
const Exam exam1;

cout << " Exam = "<cout << " Numbe of paper = " << exam1.getpaper();

getch();
return 0;
}
Back to top Go down
 
cs304 paper 2010
Back to top 
Page 1 of 1
 Similar topics
-
» CS304 FINALTERM PAPERS 2010
» CS304 FINALTERM PAPERS 2010
» CS304 MIDTERM FALL 2010
» eng301 paper 2010
» MGT502 TODAYS PAPER 2010

Permissions in this forum:You cannot reply to topics in this forum
KING'S IT WORLD :: EDUCATION :: PAPERS :: MIDTERM MAY 2010 LATEST PAPERS-
Jump to: