C Programming Language : Basics


1. What will be the output of the code ________?


    #include<stdio.h>

    int main()

    {

        int i = -3;

        int j = i % 2;

        printf(“%d\n”, j);
         
    }



2. What will be the output of the code ________?


    #include<stdio.h>

    int main()

    {

        int i = 1;

        int x = i++, y = ++i;

        printf("%d % d\n", x, y);

        return 0;

    }



3. What will be the output of the code ________?


    #include<stdio.h>

    void main()

    {

        int i = 65;

        int j = sizeof(i++);

        printf("i is %d", i);

    }



4. What will be the output of the code ________?


    #include<stdio.h>

    void main()

    {
    
        int x = 5, y, z;

        y = --x;

        z = x--;

        printf("%d%d%d", x,  y, z);

    }



5. Which of the following declaration is incorrect?




6. Which keyword is used to prevent any changes in the variable within a C program?




7. Which is incorrect declaration of pointer in c ?




8. Which keyword is used for coming out of recursion?




9. Break keyword is not used in ?




10. What will be the output of the code ________?


    #include<stdio.h>

    int main()

    {

        int x = 0, i = 0;

        for (i = 0;i < 5; i++)

        {

            a++;

            continue;

        }
         
    }