Operators


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int num1 = 5;
    int num2 = 10 % 3 * 12 / 4;
    printf("Value of num is %d", num2);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Value of num is


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int num = 7.5 % 3;
    printf("Value of x is %d", num);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Compilation Error



  1. What will be the final value of x in the following C code?
    #include <stdio.h>
    void main()
    {
    int num = 11 * 6 / 5 + 23;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    36


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = -13;
    k = k / 3;
    printf("%d\n", k);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    -4



  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = 13;
    k = k / 3;
    printf("%d\n", k);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    4