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 6068You 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 5440
can any one tel me wt is the question pattern for NIC exam
What is 1d array in c?
Which programming language is best for getting job 2020?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
Should I learn c before c++?
Explain what is the difference between #include and #include 'file' ?
How can I find out the size of a file, prior to reading it in?
What does malloc () calloc () realloc () free () do?
What is difference between arrays and pointers?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What is main () in c?
How can I find the modification date of a file?
What is structure padding in c?
Write a program to reverse a string.
Why malloc is faster than calloc?