C Programming Language Output this code Quizzes 2


  • 1. What is the output of this C code?

    #include<stdio.h>	
    void main()
    {
        int x = 97;
        int y = sizeof(x++);
        printf("x is %d", x);
    }
    





  • 2. What is the output of the below c code?

    #include<stdio.h>
    void main()
    {
        char *s = "hello";
        char *p = s;
        printf("%p\t%p", p, s);
    }
    





  • 3. What is the output of this C code?

    #include<stdio.h>
    void main()
    {
        static int x;
        if (x++ < 2)
        main();
    }
    





  • 4. What is the output of this C code?

    #include<stdio.h>
    int main()
    {
        printf("Hello World! %d \n", x);
        return 0;
    }





  • 5. What will happen if the below program is executed?

    #include
    int main()
    {
        int main = 3;
        printf("%d", main);
        return 0;
    }
    





  • 6. What is the output of this C code?

    #include<stdio.h>
    int main()
    {
        int a = 10;
        if (a == a--)
            printf("TRUE 1\t");
        a = 10;
        if (a == --a)
            printf("TRUE 2\t");
    }
    





  • 7. What is the output of this C code?

    #include<stdio.h>
    int main()
    {
            int x=35;
            printf("%d %d %d",x==35,x=50,x>40);
            return 0;
    }
    





  • 8. What is the output of the below c code?

    #include<stdio.h>
    int main()
    {
        int a=8,b=2,c;
        c=a<<b;
        printf("%d",c);
        return 0;
    }
    
    





  • 9. What is the output of this C code?

    #include<stdio.h>
    int main()
    {
       char chr;
       chr = 128;
       printf("%d\n", chr);
       return 0;
    }
    





  • 10. What is the output of this C code?

    #include<stdio.h>
    int main()
    {
        int y = 2;
        int z = y +(y = 10);
        printf("%d\n", z);
    }