C# MCQ With Questions and Answer

                                
What is the output of the following script? <?php function ratio ($x1 = 10, $x2) { if (isset ($x2)) { return $x2 / $x1; } } echo ratio (0); ?>
A.0
B.An integer overflow error
C.A warning, because $x1 is not set
D.A warning, because $x2 is not set
E.A floating-point overflow error
                                
What will be the result of the following operation? array_combine(array("A","B","C"), array(1,2,3));
A.array("A","B",C",1,2,3)
B.array(1,2,3,"A","B",C")
C.array("A"=>1,"B"=>2,"C"=>3)
D.array(1=>"A",2=>"B",3=>"C")
E.array(1,2,3)
                                
Which options do you have in PHP to set the expiry date of a session?
A.Set the session.duration directive in php.ini
B.Set session cookie expiry date locally via session_set_cookie_params()
C.Set session expiry date locally via session_cache_expire()
D.None of the above
                                
What type of class definition can be used to define multiple inheritance?
A.Class
B.Abstract
C.Interface
D.Final
                                
PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...
A.implements Traversable
B.is an instance of ArrayObject
C.implements ArrayAccess
D.None of the above