can we declare a function inside the structure? ex: struct book { int pages; float price; int library(int,float); }b; is the above declaration correct? as it has function declaration?
2 5017You 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.
2 4583
How to create struct variables?
Can we use visual studio for c?
Write a program to print "hello world" without using a semicolon?
Explain how can I right-justify a string?
What is the size of enum in c?
what is stack , heap ,code segment,and data segment
What are control structures? What are the different types?
How can I implement sets or arrays of bits?
Lists the benefits of c programming language?
find the sum of two matrices and WAP for it.
What is c language in simple words?
What is the use of #include in c?
What is an auto keyword in c?
What is 'bus error'?
What is a nested loop?