What is the purpose of the following code?
Is there any problem with the code?

void send(int count, short *to, short *from) {
/* count > 0 assumed */
register n = (count + 7) / 8;
switch (count % 8)
{
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
}
while (--n > 0);
}
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

0 Answers  


What is auto keyword in c?

0 Answers  


Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()

2 Answers   Accenture, TCS,


write a program for 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4 4

1 Answers  


Can include files be nested? How many levels deep can include files be nested?

0 Answers   Aspire, Infogain,






Can we compile a program without main() function?

0 Answers  


what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }

1 Answers  


What is Conio.h ?

2 Answers   TCS,


dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?

4 Answers  


count the numbers between 100 and 300, that star with 2 and ends with 2

5 Answers   Mind Tree,


What is calloc malloc realloc in c?

0 Answers  


What are preprocessor directives?

0 Answers  


Categories