Operators


  1. What will be the output of the following C code?
     #include <stdio.h>
    void main()
    {
    int var1 = 2, var2 = 0, var3 = 6;
    int R = var1 && var2 || var3++;
    printf("%d", var3);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    7


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int p = 20, q = 10, r = 10;
    int s;
    s = p == (q + r);
    printf("%d", s);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    1



  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int var1 = 16;
    double var2 = 3.26;
    int var3;
    var3 = var1 + var2;
    printf("%d", var3);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    19


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    +, –



  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