C# MCQ With Questions and Answer

                                
Which of the following is NOT possible using reflection?
A.Analysing of nearly any aspect of classes and interfaces
B.Analysing of nearly any aspect of functions
C.Adding class methods
D.Implement dynamic construction (new with variable class name)
                                
Which of the following statements are NOT true?
A.SimpleXML allows removal of attributes.
B.SimpleXML allows addition of new attributes.
C.SimpleXML allows removal of nodes.
D.SimpleXML allows addition of new nodes.
E.None of the above
                                
Which is the most efficient way to determine if a key is present in an array,assuming the array has no NULL values?
A.in_array('key', array_keys($a))
B.isset($a['key'])
C.array_key_exists('key', $a)
D.None of the above
                                
Which is the most secure approach for handling dynamic data in SQL queries?
A.Use addslashes().
B.Enable magic_quotes_gpc.
C.Use prepared statements if supported by the database library, data-specific escaping functions otherwise.
D.Use stored procedures.
                                
What is the output of the following script? <?php class a { public $val = 10; } function renderVal (a $a) { return $a->$val; } renderVal (new a); ?>
A.Nothing
B.NULL
C.A fatal error
D.$val
E.10