Documents

XCS246

Categories
Published
of 13
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Description
XCS246
Transcript
  1.Define object oriented programming? OOP is an approach that provides a way of modularizing programs by creating  partitioned memory areas for both data and functions that can be used as an templates for creating copies of such modules on demand. 2.List some features of OOP? i.Emphasis is on data rather than procedures.ii.Programs that are divided into what are known as objects.iii.Follows bottom – up approach in program design.iv.Functions that operate on the data of an object are tried together in the data structure. 3.Define objects? n entity that can store data and send and receive messages. !t is an instance of a class. 4.What are the basic concepts of OOPs? i.Objectsii. lassiii.#ata bstractioniv.Encapsulationv.!nheritancevi.Polymorphismvii.#ynamic binding viii.$essage passingi%. 5.Define cass?  group of objects that share common properties and relationships. !t is a new data type that contains member variables and functions that operate on the variables.  class is defined with a keyword class. !. Define data encapsuation?  wrapping up of data and functions into a single unit is known as encapsulation.&. 'hat is inheritance(!t is the process by which objects of one class ac)uire the properties of the another class. . Define operator o#eroading? *he process of making an operator to e%hibit different behavior in different instances is known as operator overloading. $. Define d%namic binding? #ynamic binding means that the code associated with a given procedure is not known until the time of the call at run time. 1&. 'i#e some ad#antages of OOP(s? i. *hrough inheritance we can eliminate redundant code and e%tend the use of e%isting.  ii. lasses.iii. Easy to partition the work.iv. +oftware comple%ity can easily be managed. 11. What are the object oriented anguages used? ã Object based programming languages ã Object oriented programming languages 12. 'i#e some appications of OOPs? i. ,eal time systemsii. +imulation and modeling iii. Object oriented databasesiv. !$- # systems 13. 'i#e the structure of a )** program?14. Write aprogram to dispa% thefoo+ing using singe coutstatement?,ame - /ge - 230incude iostream.h#oid maincout6,ame - 7n66/ge - 2368915. What is a comment? omments start with a double slash symbol and terminate at the end of the line.  comment may start any where in the line and whatever follows till the end of the line is ignored. 1!. List some to:ens? eywords/ identifiers/ constants/ strings and operators. 1;. Define structures and casses?<tructures=>  hierarchical set of names that refer to an aggregate of data items may have different attributes. )ass=>  group of objects that share common properties and relationships.  classis defined with a keyword class. 1 . Define arra%s?ncude fies)ass decaration)ass function definition@ain function program   collection of data elements arranged to be inde%ed in one or more dimensions. *he arrays are stored in contiguous memory. 1$. What are the t+o +a%s to create s%mboic constant? ã 0sing a )ualifier constant ã #efining a set of integer constants using enum keyword. 2&. What are the ne+ operators used in )**?== <cope resoution operator==A Pointer to member decaration>A Pointer to member operator .A Pointer to member operatorne+ Line feed operatordeete memor% reease operatorset+ Bied +idth operator21. What are the t+o forms of if statement? 'i#e the s%ntaC aso? *he two forms of if statement arei.+imple if statementii.!f – else statement+ynta%12 Borm 1=> !f3e%pression is true45ction678ction97 Borm 2=>  !f 3e%pression is true45ction678Else5ction978ction:7 22. What is an eCpression? n e%pression is a combination of operators/ constants and variables arranged as  per rules of the language. !t may include function calls which return values. 23. Define :e%+ords?  eywords are e%plicitly reserved identifiers and cannot be used as names for the  program variables or other user defined program elements. 24. Define pointers?  data type that holds the address of a location in memory. 25. What is an enumerated data t%pe?  data type consisting of a named set of values. *he ;; compiler assigns an integer to each member of the set. 2!. What is a main function? ll the ;; programs start with the function main34. Function main returns the integer value that indicates whether the program e%ecuted successfully or not. <%ntaC=> @ain92;. What is the purpose for the return statement? *he return statement is used to return the value from a function. *he statement return <7 returns the value <. *he return statement supplies a value from the called function to the calling function. 2 . Cpain function protot%pe? !t is used to describe the function interface to the compiler by giving details such as type number and type arguments and the type of return values. Function prototype is a declaration statement in the calling program. <%nteC=> *ype function=name 3arguments47 2$. What is a ca b% reference?  function call mechanism that passes arguments to a function by passing the addresses of the arguments. 3&. Define ca b% #aue?  function call mechanism that passes arguments to a function by passing a copy of the value of the arguments. 31. Define macro?  short piece of te%t or te%t template that can be e%panded into a longer te%t. 32. What do %ou inine function?  function definition such that each call to the function is in effect replaced by thestatements that define the function. 33. What are the situations that inine functions ma% not +or:? 6. For function returning values/ if a loop/ a switch/ or a goto e%ists.9. For function not returning values/ if a return statement e%ists.:. !f function contains static variables.>. !f inline functions are recursive. 34. What are constant arguments?

out1

Jul 23, 2017
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks