Arithmetic Operations

Post Test

  1. Which of the following data type will throw an error on modulus operation(%)?

  2. Char
    Short
    Int
    Float

  3. The operator that takes two operands are called

  4. Unary operator
    Binary operator
    Ternary operator
    None of them

  5. What is the output of the C statement?
    int main()
    {
    int a=0;
    a = 4 + 4/2*5 + 20;
    printf("%d", a);
    return 0;
    }

  6. }

    40
    4
    34
    54

  7. What is the output of the C Program?
    int main()
    {
    int a= 3 + 5/2;
    printf("%d", a);
    return 0;
    }

  8. 3
    2
    5
    Cannot assign an expression to variable at the declaration

  9. Operator % in C Language is called?

  10. Percentage Operator
    Quotient Operator
    Modulus
    Division