C# MCQ With Questions and Answer

                                
When working with the MVC paradigma, the business logic should be implemented in which of the following components?
A.Model
B.View
C.Controller
                                
What will be the output value of the following code? $array = array(1,2,3); while (list(,$v) = each($array)); var_dump(current($array));
A.bool(false)
B.int(3)
C.int(1)
D.NULL
E.Array
                                
What is the output of the following code? try { class MyException extends Exception {}; try { throw new MyException; } catch (Exception $e) { echo "1:"; throw $e; } catch (MyException $e) { echo "2:"; throw $e; } } catch (Exception $e) { echo get_class($e); }
A.A parser error, try cannot be followd by multiple catch
B.1:
C.2:
D.1:Exception
E.1:MyException
F.2:MyException
                                
What is the output of the following code? $first = "second"; $second = "first"; echo $$$first;
A.first
B.second
C.an empty string
D.an error
                                
What DOMElement method should be used to check for availability of a non-namespaced attribute?
A.getAttributeNS()
B.getAttribute()
C.hasAttribute()
D.hasAttributeNS()