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

Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

0 Answers  


How can you tell whether a program was compiled using c versus c++?

0 Answers  


What is the difference between int main and void main in c?

0 Answers  


What is the time and space complexities of merge sort and when is it preferred over quick sort?

0 Answers   Amazon,


array of pointer pointer to array pointer to pointer

1 Answers   MAHINDRA,


write a program in c to read array check element is present or not?

1 Answers  


Explain what are the __date__ and __time__ preprocessor commands?

0 Answers  


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

0 Answers   Subex,


Is the below things valid & where it will be stored in memory layout ? static const volatile int i; register struct { } ; static register;

2 Answers   Lucent,


program to get the remainder and quotant of given two numbers with out using % and / operators?

10 Answers   College School Exams Tests, IBM,


How do we declare variables in c?

0 Answers  


Why do we use static in c?

0 Answers  


Categories