C Questions

0 votes, 0 avg
723

C Questions

1 / 15

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

    #include 

    void main()

    {

        int i = 0;

        while (i < 10)

        {

            i++;

            printf("hin");

            while (i < 8) 

            {

                i++;

                printf("hellon");

            }

        }

    }

2 / 15

2. What will be the output of the following C code if following commands are used to run (considering myfile exists)?

3 / 15

3. Which option should be selected to work the following C expression?

string p = "HELLO";

4 / 15

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

        #include 

        struct student

        {

            char *c;

            struct student *point;

        };

        void main()

        {

            struct student s;

            printf("%d", sizeof(s));

        }

5 / 15

5. How are String represented in memory in C?

6 / 15

6. Which of the following is true about return type of functions in C?

7 / 15

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

        #include 

        int main()

        {

            int x = 0;

            if (x == 1)

                if (x == 0)

                    printf("inside ifn");

                else

                    printf("inside else ifn");

            else

                printf("inside elsen");

        }

8 / 15

8. Which of the following are themselves a collection of different data types?

9 / 15

9. What is an example of iteration in C?

10 / 15

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

        #include 

        struct student

        {

            int no = 5;

            char name[20];

        };

        void main()

        {

            struct student s;

            s.no = 8;

            printf("hello");

        }

11 / 15

11. Which C keyword is used to extend the visibility of variables?

12 / 15

12. Which of the following is the correct syntax to declare a 3 dimensional array using pointers?

13 / 15

13. Which of the following option is the correct representation of the following C statement?

e = a * b + c / d * f;

14 / 15

14. double ______ (double x, double y) computes the floating-point remainder of x/y.

15 / 15

15. The concept of two functions with same name is know as?

Your score is

The average score is 39%

0%