Arithmetic Operations

Pre-Test

  1. Which of the following is not an arithmetic operation?

  2. a * = 10;
    a / = 10;
    a ! = 10;
    a % = 10;

  3. What is the precedence of arithmetic operators (from highest to lowest)?

  4. %,*, /, +,-
    %, +, /, *, –
    +, -, %, *, /
    %, +, -, *, /

  5. What will be the output of the following C code?
    #include
    voidmain()
    {
    int a =3;
    int b =++a + a+++--a;
    printf("Value of b is %d", b);

  6. }

    Value of x is 12
    Value of x is 13
    Value of x is 10
    Undefined behaviour

  7. Which among the following are the fundamental arithmetic operators, i.e., performing the desired operation can be done using that operator only?

  8. +, –
    +, -, %
    +, -, *, /
    +, -, *, /, %

  9. What will be the output of the following C code?
    #include
    intmain()
    {
    int a =10;
    double b =5.6;
    int c;
    c = a + b;
    printf("%d", c);
    }

  10. 15
    16
    15.6
    10