Operators


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    8


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = 12;
    int *ptr = &k;
    printf("%d\n", *ptr++);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    12



  1. What will be the output of the following C code?












  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    3 4 4


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int num1 = 99;
    int num2 = sizeof(num1++);
    printf("num1 is %d", num1);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    num1 is 99



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    3, 2