C# MCQ With Questions and Answer

                                
How can the line on which HTTP headers were sent inside a script be determined?
A.Using the headers_sent() function.
B.Using the output_start() function.
C.Using the ob_start() function.
D.Cannot be determined
                                
Given the following array: $a = array(28, 15, 77, 43); Which function will remove the value 28 from $a?
A.array_shift()
B.array_pop()
C.array_pull()
D.array_unshift()
                                
The purpose of the singleton pattern is to...
A....create applications that only a single user may use.
B....have just one single instance of an object in the entire application.
C....have only one instance of each object in a collection of objects.
                                
What is the output of the following code? class test { public $value = 0; function test() { $this->value = 1; } function __construct() { $this->value = 2; } } $object = new test(); echo $object->value;
A.2
B.1
C.0
D.3
E.No Output, PHP will generate an error message.
                                
What is "instanceof" an example of:
A.a boolean
B.an operator
C.a function
D.a language construct
E.a class magic