Choose the statement which defines the Nullable type Correctly:
Anonymous Quiz
0%
a) A special version of a value type that is represented by a structure
50%
b) A nullable type can also store the value null
50%
c) Nullable types are objects of System.Nullable, where T must be a non nullable value type
0%
d) All of the mentioned
class UnsafeCode
{
static void Main()
{
int count = 100;
int? result = null;
int incr = 10;
result = count + incr;
if (result.HasValue)
Console.WriteLine("result has this value: " + result.Value);
else
Console.WriteLine("result has no value");
Console.ReadLine();
}
}
Coding Quiz Zone
class UnsafeCode { static void Main() { int count = 100; int? result = null; int incr = 10; result = count + incr; if (result.HasValue) Console.WriteLine("result has this value: " + result.Value);β¦
What will be the output of the following C# code snippet?
Anonymous Quiz
13%
a) Run time error
63%
b) 110
13%
c) Result has no value
13%
d) Compile time error
class UnsafeCode
{
static void Main()
{
int? count = null;
int? result = null;
int incr = 10;
result = count + incr;
if (result.HasValue)
Console.WriteLine("result has this value: " + result.Value);
else
Console.WriteLine("result has no value");
Console.ReadLine();
}
}
Coding Quiz Zone
class UnsafeCode { static void Main() { int? count = null; int? result = null; int incr = 10; result = count + incr; if (result.HasValue) Console.WriteLine("result has this value: " + result.Value);β¦
What will be the output of the following C# code snippet?
Anonymous Quiz
13%
a) Run time error
63%
b) 0
25%
c) Result has no value
0%
d) Compile time error
To retrieve the character at index 3 from string s=βHelloβ what command do we execute (multiple answers allowed)?
Anonymous Quiz
0%
a) s[]
50%
b) s.getitem(3)
38%
c) s.__getitem__(3)
13%
d) s.getItem(3)
To return the length of string s what command do we execute?
Anonymous Quiz
20%
a) len(s) OR s.__len__()
60%
b) len(s) only
20%
c) size(s)
0%
d) s.size()
If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.
Anonymous Quiz
20%
a) obj.__str__()
60%
b) str(obj)
10%
c) print obj
10%
d) all of the mentioned
A programming technique in which the focus is on doing things.
Anonymous Quiz
17%
a) object oriented
25%
b) procedural
50%
c) logical
8%
d) structural
A procedural programming follows ___________ approach.
Anonymous Quiz
45%
a) top-down
27%
b) bottom-up
27%
c) left-right
0%
d) right-left
A basic unit of object-oriented programming.
Anonymous Quiz
8%
a) module
8%
b) block
83%
c) object
0%
d) token
__________ represents a particular instance of a class.
Anonymous Quiz
9%
a) module
18%
b) block
64%
c) object
9%
d) token
A concept that combines data and functions into a single unit called class.
Anonymous Quiz
8%
a) inheritance
58%
b) encapsulation
33%
c) polymorphism
0%
d) abstraction
The ability for programmers to use the same written and debugged existing class.
Anonymous Quiz
54%
a) Reusability
23%
b) Design
23%
c) Debugging
0%
d) Implementation
This concept allows routines to use data again at different times.
Anonymous Quiz
0%
a) Abstraction
50%
b) Polymorphism
42%
c) Inheritance
8%
d) Implementation
The process of forming a new class from an existing class.
Anonymous Quiz
8%
a) Abstraction
23%
b) Polymorphism
54%
c) Inheritance
15%
d) Implementation
Abstraction combines the data and functions into a single unit called a class.
Anonymous Quiz
64%
a) True
36%
b) False
A ______________ represents the need of information in the program without the presenting the details.
Anonymous Quiz
27%
a) abstraction
36%
b) polymorphism
36%
c) implementation
0%
d) class
A testing conducted at the developerβs site under validation testing.
Anonymous Quiz
0%
a) alpha
67%
b) gamma
25%
c) lambda
8%
d) unit
A ________ is tested to ensure that information properly flows into and out of the system.
Anonymous Quiz
44%
a) module interface
44%
b) local data structure
0%
c) boundary conditions
11%
d) paths
A testing strategy that tests the application in the context of an entire system.
Anonymous Quiz
0%
a) System
70%
b) Validation
30%
c) Unit
0%
d) Gray box