Skill Test

12 Questions | Total Attempts: 146

SettingsSettingsSettings
Skill Assessment Quizzes & Trivia

Skill Test is a unique platform to assess your skills and showcase your expertise.


Questions and Answers
  • 1. 
     Which is correct with respect to size of the datatypes?
    • A. 

      Char > int > float

    • B. 

      int > char > float

    • C. 

      char < int < double

    • D. 

      Double > char > int

  • 2. 
    What is the output of this C code?
    1. #include
    2. int main()
    3. {
    4. enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
    5. printf("PEACH = %d\n", PEACH);
    6. }
    • A. 

      PEACH = 3

    • B. 

      PEACH = 4

    • C. 

      PEACH = 5

    • D. 

      PEACH = 6

  • 3. 
    • A. 

      2

    • B. 

      8

    • C. 

      10

    • D. 

      9

  • 4. 
    What is the output of this C code?
    1. #include
    2. void foo(const int *);
    3. int main()
    4. {
    5. const int i = 10;
    6. printf("%d ", i);
    7. foo(&i);
    8. printf("%d", i);
    9.  
    10. }
    11. void foo(const int *i)
    12. {
    13. *i = 20;
    14. }
    • A. 

      Compile time error

    • B. 

      10 20

    • C. 

      Undefined value

    • D. 

      10

  • 5. 
    • A. 

      10

    • B. 

      11

    • C. 

      Compile time error

    • D. 

      0

  • 6. 
    Does this compile without error?
    1. #include <stdio.h>
    2. int main()
    3. {
    4. int k;
    5. {
    6. int k;
    7. for (k = 0; k < 10; k++);
    8. }
    9. }
    • A. 

      Yes

    • B. 

      No

    • C. 

      Depends on the compiler

    • D. 

      Depends on the C standard implemented by compilers

  • 7. 
     Which of the following declaration is not supported by C?
    • A. 

      String str;

    • B. 

      Char *str;

    • C. 

      float str = 3e2;

    • D. 

      Both (a) and (c)

  • 8. 
     What is the output of this C code?
    1. #include <stdio.h>
    2. void main()
    3. {
    4. int x = 97;
    5. char y = x;
    6. printf("%c\n", y);
    7. }
    • A. 

      A

    • B. 

      B

    • C. 

      97

    • D. 

      Run time error

  • 9. 
    What is the output of this C code?
    1. #include <stdio.h>
    2. int main()
    3. {
    4. int a = 1, b = 1, d = 1;
    5. printf("%d, %d, %d", ++a + ++a+a++, a++ + ++b, ++d + d++ + a++);
    6. }
    • A. 

      9, 6, 9

    • B. 

      15, 4, 5

    • C. 

      9, 3, 5

    • D. 

      6, 4, 6

  • 10. 
    • A. 

      Its zero

    • B. 

      Run time error

    • C. 

      Its not zero

    • D. 

      None

  • 11. 
    What is the output of this C code?
    1. #include
    2. int main()
    3. {
    4. int x = 0;
    5. if (x++)
    6. printf("true\n");
    7. else if (x == 1)
    8. printf("false\n");
    9. }
    • A. 

      Undefined behaviour

    • B. 

      Compile time error

    • C. 

      False

    • D. 

      True

  • 12. 
    What is the output of this C code?
    1. #include <stdio.h>
    2. void main()
    3. {
    4. int k;
    5. for (k = -3; k < -5; k++)
    6. printf("Hello");
    7. }
    • A. 

      Run time error

    • B. 

      Infinite hello

    • C. 

      Nothing

    • D. 

      Hello