Tag: programming languages

Questions Related to programming languages

  1. Opens a file notes.txt

  2. fails to create a file and displays error

  3. fails to open a file but doesn't display error

  4. Opens a file but not notes.txt


Correct Option: D

$a=[ { name=> "rose", kids=> [ qw( ted bobby john ) ] }, { name=> "marge", kids=> [ qw( maggie lisa bart ) } ]

  1. A list of hashes which contains a list

  2. A hash of hashes which contains a list

  3. A list of list which contains another list

  4. A list of arrays and hashes containing lists


Correct Option: A
  1. when arrays and references are passed

  2. only when references are passed

  3. args are not changed

  4. Command line args are changed


Correct Option: D
  1. all key value pairs are copied but in random order

  2. all key value pairs are copied in proper order

  3. all key value pairs from def may not be copied into abc

  4. syntax error


Correct Option: A