Home > MCQs > IT & Programming > Embedded C MCQs

Embedded C MCQ

For those looking to excel in Embedded C, Quizack is the perfect online resource. Our comprehensive database includes hundreds of embedded c mcq questions that are essential for mastering this subject. Each question is followed by a detailed explanation so you can understand and remember the concepts better. All c mcq questions and answers are based on real-world scenarios, allowing you to get a more practical understanding of Embedded C programming techniques.

Embedded C Quick Quiz

Question 1 of 10
  • What will be the output of the following program?

    #include <stdio.h>

    void abc(int num1[], int size)

    {

      int a = 0, b = size–1;

      while (a < b)

      {

    while (num1[a] == 0 && a < b)

    a++;

    while (num1[b] == 1 && a < b)

    b––;

    if (a < b)

    {

      num1[a] = 0;

      num1[b] = 1;

      a++;

      b––;

    }

      }

    }

    int main()

    {

      int num[] = {1, 0, 1, 0, 1, 0, 1, 1, 0};

      int z = 9, x = 0;

      abc(num, z);

      for (x = 0; x < 9; x++)

      printf("%d ", num[x]);

      getchar();

      return 0;

    }


    Answer & Explanation

    Correct Answer:

     0 0 0 0 1 1 1 1 1 

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

  • What is the output of the following program ?

    main()

    {

    int u = 1, v = 3;

    printf("%d %d",u,v);

    funct1(&u,&v);

    printf(" %d %d\n",u,v);

    }

    void funct1(int *pu, int *pv)

    {

    *pu=0;

    *pv=0;

    return;

    }


    Answer & Explanation

    Correct Answer:

    1 3 0 0

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

  • Which of the following are types of hardware interrupts?

    Answer & Explanation

    Correct Answer: Serial port interrupts

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

  • Which of the following statements are correct about the embedded system, TIMER interrupt?

    Answer & Explanation

    Correct Answer: A watchdog can be built using TIMER interrupts.

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

  • Which of the following options is used for reusing the 16-bit pseudo index register, __longIX, created earlier by the compiler?

    Answer & Explanation

    Correct Answer: long int exampleVar @ _ _longIX;

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

  • In relation to the watchdog timer register (WDTCTL), which of the following values for WDTISx bits signifies watchdog clock source, /512?

    Answer & Explanation

    Correct Answer: 10

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

  • If a full binary tree has a total of 63 nodes, then what will be the numbers of the internal nodes and the leaves, respectively, in the binary tree?

    Answer & Explanation

    Correct Answer: 31 and 32

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

  • What will be the output of the following program?

    #include <stdio.h>

    struct st1

    {

    int a;

    struct st1 *ptr1 ;

    };

    main( )

    {

    struct st1 w1,w2;

    w1.a = 251 ;

    w2.a = 351 ;

    w1.ptr1 = &w2 ;

    w2.ptr1 = &w1 ;

    printf ( "%d %d", w1.ptr1 –> a, w2.ptr1 –> a ) ;

    }


    Answer & Explanation

    Correct Answer:

    351 251

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

  • Which of the given types of memories has the following characteristics?

    i) It requires a block-sized 'erase' operation before this type of memory can be programmed.

    ii) It is used for the storage of a program code.


    Answer & Explanation

    Correct Answer:

    Flash ROM

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

  • Choose the correct output of the following C program.

    int main( )

    {

    int i = 3, j = 4, k, l ;

    k = abc ( i, j ) ;

    l = abc ( i, j ) ;

    k=k+3;

    l=l+3;

    printf ( "%d %d", k, l ) ;

    return 0;

    }

    abc ( int ii, int jj )

    {

    int kk, ll ;

    kk = ii + jj+3 ;

    ll = ii * jj+2 ;

    return ( kk, ll ) ;

    }


    Answer & Explanation

    Correct Answer:

    17, 17

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

  • Embedded C Quick Quiz

    battery

    Poor Results!

    You need a lot of improvement.

    Just don't give up!

    Correct Answers: 0/10

    Start Practicing with our MCQs given below.