MCQs > IT & Programming > Embedded C MCQs > Basic Embedded C MCQs

Basic Embedded C MCQ

1. The declaration int *(*p)[10] indicates:

Answer

Correct Answer: p is a pointer to an array of integer pointers

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

2. In relation to an 8085 architecture, which of the following statements is/are correct about DATA memory and CODE memory?

Answer

Correct Answer: Both options a and c.

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

3. What is the initial remainder for the CRC32 algorithm?

Answer

Correct Answer: 0xFFFFFFFF

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

4. Suppose there is a file a.dat which has to be opened in the read mode using the FILE pointer ptr1, what will be the correct syntax?

Answer

Correct Answer: ptr1 = fopen("a.dat","r");

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

5. Which of the following are the characteristics of static RAM?

Answer

Correct Answer: It is a read-write technology that uses a type of electronic flip-flop for information storage.
It does not require refreshing.

Note: This question has more than 1 correct answers

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

6.

What will be the output of the following code?

#include<stdio.h>

#include<stdlib.h>

struct abc

{ int data;

    struct abc *next;

};

void xy1(struct abc* head)

{ if(head == NULL)

    return;

    xy1(head–>next);

    if ((head–>data)%2==0)

    {printf("%d ", head–>data*31);}

    else

    {printf("%d ", head–>data*21); }

}

void xy2(struct abc* start)

{ if(start == NULL)

    return;

    if(start–>next != NULL )

    xy2(start–>next–>next);

    if((start–>data%2==0))

    {printf("%d ", start–>data*3); }

    else

    {printf("%d ", start–>data*12); }

}

void p(struct abc** head_ref, int new_data)

{ struct abc* new_node =(struct abc*) malloc(sizeof(struct abc));

    new_node–>data = new_data;

    new_node–>next = (*head_ref);

    (*head_ref) = new_node;

}

int main()

{ struct abc* head = NULL;

    p(&head, 21);

    xy1(head);

    xy2(head);

    getchar();

    return 0;

}


Answer

Correct Answer:

441 252


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

7. Which of the following is the correct voltage range used by the Motorola MC68HC705C8 microcontroller?

Answer

Correct Answer: 3.0 to 5.5 Volt

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

8.

Find the output of the following code and choose the correct answer from the given options.

#include <stdio.h>

int funct1(int num1[], int num2[], int n)

{

  int x1 = 0;

  int x2 = 0;

  int total;

  int k1 = –1, k2 = –1;

  for (total = 0; total <= n; total++)

  {

if (x1 == n)

{

  k1 = k2;

  k2 = num2[0];

  break;

}

else if (x2 == n)

{

  k1 = k2;

  k2 = num1[0];

  break;

}

if (num1[x1] < num2[x2])

{

  k1 = k2;

  k2 = num1[x1];

  x1++;

}

else

{

  k1 = k2;

  k2 = num2[x2];

  x2++;

}

  }

  return (k1 + k2)/2;

}

int main()

{

  int num1[] = {22, 27, 34, 31, 39};

  int num2[] = {22, 54, 67, 74, 46};

  int p1 = sizeof(num1) / sizeof(num1[0]);

  int p2 = sizeof(num2) / sizeof(num2[0]);

  if (p1 == p2)

  printf("%d", funct1(num1, num2, p1));

  else

  printf("failure");

  return 0;

}


Answer

Correct Answer:

35


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

9.

Which of the following options is the output of the given program?

int main( )

{

int a=8.5, f=1 ;

f = res( a ) ;

f++;

printf ( "%d", f++ ) ;

return 0;

}

res ( int x )

{

int f=1 ;

if ( x == 1 )

return ( 1 ) ;

else

f = f/4.5 + x * res ( x - 1 ) ;

return ( f++ ) ;

}


Answer

Correct Answer:

40,320


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

10.

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

Correct Answer:

17, 17


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

11. Which of the following statements are correct about the WDTCTL register?

Answer

Correct Answer: It is password-protected.
It contains control bits for configuring the RST/NMI pin.

Note: This question has more than 1 correct answers

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

12. Which of the following values of the WDTHOLD bit of watchdog timer register (WDTCTL) specifies that the watchdog timer has stopped?

Answer

Correct Answer: 1

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

13.

Choose the correct output of the following C program.

int main()

{

int i,k;

i=5;

k=abc(i);

printf("%d",k);

return 0;

}

int abc(int a)

{

int b,c,d,e;

b=6;c=9;a=a/2;

d=xyz(b);

e= d+b-(c/d)+1.5;

return(e);

}

int xyz(int w)

{

int p=1;

do

{

    p=p*w;

    w--;

}

while(w>0);

return(p);

}


Answer

Correct Answer:

727 


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

14. Which of the following is a linear list in which we can insert/delete element(s) at either end but not in/from the middle?

Answer

Correct Answer: Stack

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

15. In relation to endianness problem, which of the following pre-processor macros is used for reordering the bytes of a 16-bit unsigned value from network order to processor order?

Answer

Correct Answer: ntohs( )

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

16.

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

Correct Answer:

1 3 0 0


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

17.

Analyse the given code and answer the following question.

#include <stdio.h>

int main()

{

    typedef char (*(*abc[4])())[10];

    abc a1;

    return 0;

}

Which of the following is true about 'a1'?


Answer

Correct Answer:

It is an array of four function pointers.


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

18. How many binary trees can be formed using three nodes?

Answer

Correct Answer: 5

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

19. In relation to byte-orientation memory of an 8051 microprocessor, what is the content of the 0x03 address?

Answer

Correct Answer: 00111100

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

20.

This question is based upon the figure shown below

Which of the following is the post–order traversal of the binary tree that is given in the image?


Answer

Correct Answer:

O S P M T Q U R N L


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

21.

In relation to watchdog timer modification, which of the following statements is/are correct?

i) Before changing the clock source, the WDT should be halted to avoid a possible incorrect interval.

ii) User should not change the WDT interval along with WDTCNTCL = 1 in a single instruction for avoiding an unexpected interrupt.


Answer

Correct Answer:

Only statement i) is correct. 


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

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

Answer

Correct Answer: Access to external clock is provided by TIMER interrupts.
A watchdog can be built using TIMER interrupts.

Note: This question has more than 1 correct answers

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

23. What is the size of each header block for systems having two-byte memory pointers and available memory less than 64 bytes?

Answer

Correct Answer: 4 bytes

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

24. In relation to watchdog timer register (WDTCTL), which of the following bits is used for selecting the watchdog timer interval for setting the WDTIFG flag and/or generating a PUC?

Answer

Correct Answer: WDTISx

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

25. Which of the following statements is/are false?

Answer

Correct Answer: A compiler always performs bounds checking on an array.

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

26. Which function returns the current pointer position within a file?

Answer

Correct Answer: ftell()

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

27.

Which of the following watchdog timer registers are of read/write type?

i) Watchdog timer control register

ii) Timer_A interrupt vector register

iii) SFR interrupt enable register 1

iv) SFR interrupt flag register 1


Answer

Correct Answer:

Only options i), iii) and iv). 


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

28. Which of the following are types of hardware interrupts?

Answer

Correct Answer: Timer overflow
Serial port interrupts

Note: This question has more than 1 correct answers

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

29. In microcontroller 8051 with 256 bytes of RAM, what is the amount of memory provided to SFR registers?

Answer

Correct Answer: 128 bytes

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

30. Which of the following statements is/are false about a pointer?

Answer

Correct Answer: A pointer allows to pass variables, strings, functions, arrays, and structures as function arguments.
A pointer variable holds the value as well as the memory address of another variable.
A pointer does not allow to return structured variables from functions.

Note: This question has more than 1 correct answers

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

31.

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

Correct Answer:

351 251


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

32. In relation to microcontrollers, which of the following types of buses is/are bi-directional?

Answer

Correct Answer: Data bus.

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

33.

What will be the output of the given program?

#include<stdio.h>

#include<stdlib.h>

struct node

{

  int data;

  struct node *next;

};

void ab(struct node* head)

{

  if(head == NULL)

  return;

  ab(head–>next);

  printf("%d ", head–>data*12);

}

void de(struct node* start)

{

  if(start == NULL)

  return;

  printf("%d ", start–>data);

  if(start–>next != NULL )

  de(start–>next–>next);

  printf("%d ", start–>data*7/6);

}

void p(struct node** head_ref, int new_data)

{

  struct node* new_node =(struct node*) malloc(sizeof(struct node));

  new_node–>data = new_data;

  new_node–>next = (*head_ref);

  (*head_ref) = new_node;

}

int main()

{

  struct node* head = NULL;

  p(&head, 15);

  p(&head, 333);

  p(&head, 31);

  p(&head, 21);

  p(&head, 17);

  ab(head);

  de(head);

  getchar();

  return 0;

}


Answer

Correct Answer:

180 3996 372 252 204 17 31 15 17 36 19


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

34. In relation to embedded C, which of the following data types is used for accessing the bit addressable memory of RAM (20h-2fh)?

Answer

Correct Answer: bit

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

35. Which of the following memory types is neither volatile nor writable?

Answer

Correct Answer: Masked ROM

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

36.

This question is based upon the figure shown below

Choose from the given image, the correct output of the following code.

#include<stdio.h>

main ()

{

int x[3][3], y[3][3];

abc(x);

xyz(x,y);

printa(y);

}

abc(m)

int m[][3];

{

int i, j;

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

{for (j=0; j<3;j++)

    {m[i][j]=((i+2) + (j+3));

    }}

}

xyz(x,y)

int x[][3], y[][3];

{

int i, j;

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

for (j=0;j<3;j++)

{

    y[j][i]=x[i][j];

}

}

printa(m)

int m[][3];

{

int i,j;

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

{

    for (j=0; j<3;j++)

    printf("%d ", m[i][j]);

    printf("\n");

}

}


Answer

Correct Answer:

(4)


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

37.

Find the output of the following program and choose the correct answer from the given options.

#include <stdio.h>

#include <malloc.h>

void abc(int num2[], int num)

{

int *c = (int *)calloc(sizeof(int), (num – 2));

int i;

printf("output: ");

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

{

    if (c[num2[i]] == 1)

    printf(" %d ", num2[i]+5);

    else

    c[num2[i]]++;

}

}

int main()

{

int num1[] = {15, 10, 10, 2, 7, 4, 2};

int af = sizeof(num1) / sizeof(num1[0]);

abc(num1, af);

getchar();

return 0;

}


Answer

Correct Answer:

output: 15 7


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

38. Which of the following memory types has fast relative speed?

Answer

Correct Answer: SRAM

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

39.

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

Correct Answer:

Flash ROM


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

40. In relation to Interrupt Enable Register 1 (IE1) of the watchdog timer register, NMI interrupt enable (NMIIE) bit is recommended to be set and cleared using which of the following instructions?

Answer

Correct Answer: BIS.B

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

41. In relation to Interrupt Enable Register 1 (IE1) of the watchdog timer register, which of the following bits can be used by other modules?

Answer

Correct Answer: Bits 3-1
Bits 7-5

Note: This question has more than 1 correct answers

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

42. In relation to watchdog timer registers, the WDTPW (watchdog timer password) is always read as which of the following options?

Answer

Correct Answer: 069h

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

43.

What would be the output of the given C program?

int main( )

{

int a = 10, b = 20, m = 47, n = 96 ;

abc ( &a, &b ) ;

wxy ( &m, &n);

printf ( "%d, %d, %d, %d", a, b, m, n ) ;

return 0;

}

abc( int *x, int *y )

{

int t ;

t = *x ;

t = xyz();

*x = *y ;

*y = t++ ;

}

wxy(int *p, int *q)

{

*p = *p/2+9-1;

*q = *p/2+71-2;

}

xyz()

{

int t;

t = 6/2-54/3-(5.6/4);

return(t);

}


Answer

Correct Answer:

20, -16, 31, 84


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

44.

In relation to system reset and initialization, which of the following options can trigger the Power-Up Clear (PUC) signal?

i) The Power-On Reset (POR) signal.

ii) Security key violation of a flash memory.

iii) Security key violation of a watchdog timer.

iv) Expiration of a watchdog timer when in the watchdog mode only.


Answer

Correct Answer:

All options i), ii), iii) and iv). 


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

45. What will happen if in data structure a pop operation on the stack causes the stack pointer to move past the origin of the stack?

Answer

Correct Answer: Underflow

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

46.

What would be printed on the standard output as a result of the following code snippet?

main()

{

char *pmessage = "asdfgh";

*pmessage++;

printf("%s", pmessage);

return 0;

}


Answer

Correct Answer:

sdfgh 


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

47. In relation to the watchdog timer register (WDTCTL), what will happen if the value of WDTCNTCL bit is set to 1?

Answer

Correct Answer: It will clear the count value to 0000h.

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

48. 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

Correct Answer: 31 and 32

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

49. How many memory spaces and data buses are used by the Von Neumann architecture?

Answer

Correct Answer: One common memory space and one data bus.

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

50.

Analyse the following code and choose its correct output from the given options.

#include<stdio.h>

int main()

{

int num1[9] = {3,2,3,4,5,2,3,9,2};

int *pt1, sm=0;

int a, b, p, z, n=9;

z = n;

pt1 = num1;

for (a = 0; a < z; a++)

{

    for (b = 0; b < z; b++)

    {

        if (a == b)

        {

            continue;

        }

        else if (*(pt1 + a) == *(pt1 + b))

        {

            p = b;

            z--;

            while (p < z)

            {

                *(pt1 + p) = *(pt1 + p + 1);

                p++;

            }

            b = 0;

        }

    }

}

for (a = 0; a < z; a++)

{

    sm=sm+num1[a];

}

printf("%d",sm);

return 0;

}


Answer

Correct Answer:

23


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

51.

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))?


Answer

Correct Answer:

15


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

52.

Which of the given functions will be performed by the following program?

#include <stdio.h>

void main()

{

int arr1[15];

int a, b, number1, tmp_no;

printf("Enter any value between 2 and 15\n");

scanf("%d", &number1);

printf("Enter elements\n");

for (a = 0; a < number1; a++)

{

    scanf("%d", &arr1[a]);

}

for (a = 0; a < number1; a++)

{

    for (b = 0; b < (number1 – a – 1); b++)

    {

        if (arr1[b] > arr1[b + 1])

        {

            tmp_no = arr1[b];

            arr1[b] = arr1[b + 1];

            arr1[b + 1] = tmp_no;

        }

    }

}

for (a = 0; a < number1; a++)

{

    printf("%d\n", arr1[a]);

}

}


Answer

Correct Answer:

It will sort and print the array in the ascending order, by using the bubble sort.


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

53. What is the erase size for the EPROM memory?

Answer

Correct Answer: Entire chip.

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

54. Which of the following divisors (polynomial) is used by the cyclic redundancy check algorithm CRC16?

Answer

Correct Answer: 0x8005

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

55.

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


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

56.

Which of the following statements is/are valid and correct?

1.char amessage[] = "lmnop";

amessage++;

2.char *pmessage = "abcde";

(*pmessage)++;

3.char amessage[] = "lmnop";

(*amessage)++;

4.char *pmessage = "abcde";

pmessage++;


Answer

Correct Answer:

34 


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

57. In relation to watchdog timer operations, setting the WDTTMSEL bit to which of the following options results in selecting the interval timer mode?

Answer

Correct Answer: 1

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

58.

What function will the following code perform?

void delete_element ( node *m, int n)

{

node *p, *k;

k = search ( m, n);

if (k = = ( node *) NULL)

return;

p = k –> next;

k –>next = p –>next;

free (p);

}


Answer

Correct Answer:

It will delete the element that is next to a given element in the list.


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

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

Answer

Correct Answer: 10

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

60.

This question is based upon the figure shown below

Which of the given images represents a correct binary search tree, if the elements are inserted in the following order?

6, 31, 3, 41, 26, 5


Answer

Correct Answer:

1


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

61. In relation to National Semiconductor COP888 assembly language, which of the following is the correct syntax of the instruction that is used for executing the next instruction, on the condition that the bit 6 of register B is 1?

Answer

Correct Answer: IFBIT 06,[B]

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

62.

Consider the following code.

int i = 4, *j, *k;

Which one of the following statements will not work?


Answer

Correct Answer:

j = j * 2; 


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

63.

Choose the correct methods/techniques from the following options that can be used to design algorithms.

1. Divide and conquer

2. Greedy method

3. Back tracking

4. Branch and bound


Answer

Correct Answer:

1, 2, 3 and 4   


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

64. In the Harvard architecture of computers, how many data buses are used for accessing data and instructions?

Answer

Correct Answer: Two or more.

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

65.

What would be printed on the standard output as a result of the following code snippet?

char i = 'A';

char *j;

j = & i;

*j = *j + 32;

printf("%c",i);


Answer

Correct Answer:



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

66.

In relation to the embedded C malloc() function, which of the following is the correct syntax for defining a header block with name hExample?


Answer

Correct Answer:

typedef struct hExample {

 struct hExample *ptr;

 unsigned int size;

} HEADER; 



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

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

Answer

Correct Answer: long int exampleVar @ _ _longIX;

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

68. What is the checksum size (width) for CCITT algorithm?

Answer

Correct Answer: 16 bits

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

69. In relation to watchdog timer registers, which of the following is the correct bit range used by WDTPW (watchdog timer password)?

Answer

Correct Answer: Bits 15-8

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

70. Which of the following bits are used in the Interrupt Enable Register 1 (IE1) of the watchdog timer register?

Answer

Correct Answer: NMI interrupt enable (NMIIE)
Watchdog timer interrupt enable (WDTIE)

Note: This question has more than 1 correct answers

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

71.

Which of the following statements are correct about watchdog timers?

i) All watchdog timers can only be programmed for a single time-out delay at a time.

ii) When watchdog timers time-out, they may either reset the processor or execute an interrupt.

iii) The hardware implementation of a watchdog timer depends on the processor.


Answer

Correct Answer:

Only statements ii) and iii) are correct. 


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

72. The declaration int (*p[5])() means:

Answer

Correct Answer: p is an array of pointers to functions the return type of which is an integer

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

73.

The following program is based on a recursive algorithm. Analyze the code and choose the correct output from the given options.

#include<stdio.h>

main( )

{ static int a,f;

a=5.2; f=1;

f = res( a ) ;

f++;

printf ( "%d", f++ ) ;

}

res ( int x )

{ static int f ;

if ( x == 1 )

return ( 1 ) ;

else

f = x/4.5 + x + res ( x – 1 ) + 2 ;

return ( f++ ) ;

}


Answer

Correct Answer:

25 


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

74.

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

Correct Answer:

 0 0 0 0 1 1 1 1 1 


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

75.

Fill in the blank:

A connected graph is said to be an Eulerian graph, only if all the vertices of the graph have _______ degree.


Answer

Correct Answer:

an even


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

76. How many bits are used by the watchdog timer in the SFRs for interrupt control?

Answer

Correct Answer: Two

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