Tag: programming languages

Questions Related to programming languages

Which of the following operators work most like substitution?

  1. /f

  2. /g

  3. s///

  4. m//


Correct Option: C
  1. Invoke the Perl debugger

  2. Disable the Perl debugger

  3. Disable breakpoints

  4. Display a stack trace


Correct Option: A

Which file test can be done to see if a file is a socket?

  1. -s

  2. -l

  3. -S

  4. -k


Correct Option: A
  1. With the #include preprocessor command

  2. Adding the file’s directory to @INC and then passing the filename to require.

  3. Both A & B

  4. None of the above


Correct Option: C
  1. grep(! /^ !/, @array);

  2. Every non empty list element

  3. Every list element that does not start with an exclamation mark.

  4. Every list element.


Correct Option: B
  1. alphabetic

  2. numeric

  3. ASCII

  4. none of the above


Correct Option: C
  1. The code will fail at line 1 because a hash cannot contain both numeric and string data.

  2. The code will execute without error but will output nothing.

  3. The code will output the following: 32oz 16oz 8oz

  4. The code will output the following: large medium small


Correct Option: C