3

, 2.

15

, 3.

26

, 4.

66

, 5.

77

">
MCQs > IT & Programming > Embedded C >

This question is based upon the figure shown below

The given program, which was supposed to give output as shown in the image, has some errors. Analyse the code and choose the correct line number(s) containing error(s).

1.int main( )

2.{ int i=1,j=1,k=1;

3. abc(i,j,k);

4. xyz(i,j,k);

5. return 0;

6.}

7.abc (int a, int b, int c)

8.{ for(;a<=5;a++)

9. { for(b=5;b>a;b--)

10.    { printf(" "); }

11.    for(c=1;c<=a;c++)

12.    { printf("* "); }

13.    print("\n");

14. } }

15.xyz(int *a, int *b, int *c)

16.{ for(a=4;a>=1,a--)

17. { for(b=4;b>=a;b--)

18.    { printf(" "); }

19.    for(c=a;c>=1;c++)

20.    { printf("* "); }

21.    printf("\n");

22. } }

a. 4

b. 9

c. 13

d. 14

e. 15

f. 16

g. 17

h. 19

Given the array:

int num[3][4]= {

                {3,6,9,12},

                {15,25,30,35},

                {66,77,88,99}

                };

what would be the output of *(*(num+1)+1)+1?


Embedded C MCQs

This question is based upon the figure shown below

The given program, which was supposed to give output as shown in the image, has some errors. Analyse the code and choose the correct line number(s) containing error(s).

1.int main( )

2.{ int i=1,j=1,k=1;

3. abc(i,j,k);

4. xyz(i,j,k);

5. return 0;

6.}

7.abc (int a, int b, int c)

8.{ for(;a<=5;a++)

9. { for(b=5;b>a;b--)

10.    { printf(" "); }

11.    for(c=1;c<=a;c++)

12.    { printf("* "); }

13.    print("\n");

14. } }

15.xyz(int *a, int *b, int *c)

16.{ for(a=4;a>=1,a--)

17. { for(b=4;b>=a;b--)

18.    { printf(" "); }

19.    for(c=a;c>=1;c++)

20.    { printf("* "); }

21.    printf("\n");

22. } }

a. 4

b. 9

c. 13

d. 14

e. 15

f. 16

g. 17

h. 19

Given the array:

int num[3][4]= {

                {3,6,9,12},

                {15,25,30,35},

                {66,77,88,99}

                };

what would be the output of *(*(num+1)+1)+1?


Answer

Correct Answer:

26

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Embedded C Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Embedded C MCQ Questions

search

Embedded C Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it