What are types of preprocessor in c?
No Answer is Posted For this Question
Be the First to Post Answer
Describe how arrays can be passed to a user defined function
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer
How can we see the Expanded source code and compiled code for our source program in C?
How do you generate random numbers in C?
class foo { public: static int func(const char*& p) const; }; This is illegal, why?
read an array and search an element
What does typedef struct mean?
What is the difference between new and malloc functions?
How to removing white spces in c programming only bu using loops
How to add two numbers with using function?
explain what is a newline escape sequence?
You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.