Tag: programming languages

Questions Related to programming languages

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

  1. %d

  2. %ud

  3. %u

  4. all the above


Correct Option: C

Which takes the first precedence in evaluation among the following operators?

  1. ||

  2. !

  3. &&

  4. All the Above has equal precedence


Correct Option: B

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
  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