What is operator promotion?
No Answer is Posted For this Question
Be the First to Post Answer
Explain what is the heap?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What are macros in C?
which operator having lowest precedence?? a.)+ b.)++ c.)= d.)%
void main() { int a=1; printf("%d %d %d",a,++a,a++); } the output is supposed to be 1 2 2....but it is 3 3 1 this is due to calling conventions of C. if anyone can explain me how it happens?
What are structure members?
How main function is called in c?
How can I read a directory in a C program?
2 Answers Bright Outdoor, Wipro,
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.
What is n in c?
why we are using float in C
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?