Types of Polymorphism
Operator overloading
Virtual functions
Virtual base class
Function overloading
Encapsulation is the process of combining data and functions into a single unit called class.
True
False
Which of the following statements are true?a. By default,all members of structure are private.b.new and delete operator can be overlaodedc.friend fucntion can overload [],(),= operators.
a only
a and b
b only
none of the above
Default return type of functions in C++ is
Void
Int
Bool
Which of the following statement/statements is /are true ?
Reference types are stored on stack and value types are stored on heap area.
Boxing allows you to convert value types to reference types.
For boxing, during runtime it creates a temporary reference type box for the object on the heap
Unboxing allows you to convert reference type to value type
Which statement is/are correct ?
In C#, we can define one and only one main( ) method .
If there is more than one main( ) method defined in your programme ,the compiler will return compile time error.
If there is more than one main( ) method defined you can explicitely tell the compiler which main( ) method is to be used as the entry point.
All the statements are wrong
Which of these are correct answers for Identifiers used in C# ?
These are the names that one user gives to variables such as the user defined types(eg;classes and structs)
These are not case sensitive.
Their names must begin with a letter or with a underscore .
They must not contain any numeric characters
You can not use C# keywords as the Identifiers
abstract is a valid identifier .
_Identifier and \u006fIdentifier are identical
Identifiers can also contain unicode characters.
Which of the folowing are correct for the Structs and Classes ?
Both are essential templates for which we can create objects.
Both structs and classes are reference types and are stored on heap .
For both struct and class, we use 'new' keyword to declare an instance.
All of the above are correct
Which of the following are correct ?
Value types are stored in heap and reference types are stored in stack area.
Boxing allows users to convert value types to reference types
Unboxing allows users to convert value type to reference type.
During runtime boxing creates a temporary reference type box for the object on the heap.