0

programming languages Online Quiz - 54

Description: programming languages Online Quiz - 54
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

What will happen? int main(int argc, char*argv) { char ptr = NULL; free(ptr); return 0; }

  1. core dump

  2. nothing

  3. undefined behavior

  4. all the above


Correct Option: B

Given: 31. // some code here 32. try { 33. // some code here 34. } catch (SomeException se) { 35. // some code here 36. } finally { 37. // some code here 38. } Under which three circumstances will the code on line 37 be executed? (Choose three.)

  1. The instance gets garbage collected.

  2. The code on line 33 throws an exception.

  3. . The code on line 35 throws an exception

  4. The code on line 31 throws an exception

  5. The code on line 33 executes successfully


Correct Option: B,C,E

The code used for denoting unsigned decimal integer in scanf is :

  1. %d

  2. %ud

  3. %u

  4. all the above


Correct Option: C

What gets printed? int i = 3; if (!i) i++; i++; if (i==3) i+=2; i+=2; printf("%d\n", i);

  1. 6

  2. 7

  3. 3

  4. 5


Correct Option: A

What is the command to display a file in reverse

  1. rev filename

  2. cat -r filename

  3. tac filename

  4. filerev filename


Correct Option: C
  1. creates a_b,c file

  2. syntax error

  3. changes the timestamps of a_bc file

  4. creates a_b and a_c files


Correct Option: D

How can preserve timestamps of a file while copying

  1. bydeflut it preserves

  2. cp -in

  3. cp -p

  4. cp -t


Correct Option: C
  1. type filename

  2. type - -info filename

  3. file filename

  4. none


Correct Option: C
  1. mail client

  2. web browser

  3. text browser

  4. backup engine


Correct Option: A

How to clear the console?

  1. clear

  2. reset

  3. tput clear

  4. all


Correct Option: D
  1. sAGAR,PRAVEEN

  2. Sagar, praveen

  3. ,SAGAR,PRAVEEN

  4. sagar,Praveen


Correct Option: B

Which is not a browser?

  1. Lynx

  2. Emacs/w3

  3. links

  4. browsee


Correct Option: D
- Hide questions