Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OOPS ANSWER KEY
#1

OOPS ANSWER KEY

[attachment=17637]

PART-A
1) What are new type conversions available in c++?
basic to class type conversion
class to class type conversion
class to basic type conversion

2) what is generic programming?
Generic programming is an approach where generic types are used as parameters in algorithms so that they work for a variety of suitable data types and data structures. Templates provide support for generic programming.
3) Give the syntax for function templates.
template<class T>
returntype functioname(arguments of type T)
{
// ..
//body of the function with type T wherever appropriate
//
}
4) Give the 3 constructs for defining exception handling.
Try block
Catch block
Throw statement
5) What are the two types of exceptions available in c++?
Synchronous exceptions
Eg- division by zero, access to an array out of its bounds.
Asynchronous exceptions
Eg- interruption of keyboard.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.