Operators


  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. 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>
    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>
    void main()
    {
    int num1 = 2, num2 = 0, num3 = 6;
    int Res = num1 && num2 && num3++;
    printf("%d", num3);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    6



  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int n1 = 1, n2 = 3, n3 = 4;
    int R = n1 & n2 | n3;
    printf("%d", R);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    5