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 6094You 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 5466
What is 02d in c?
Define macros.
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What does dm mean sexually?
What is the significance of scope resolution operator?
Which programming language is best for getting job 2020?
What are different types of operators?
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
How can variables be characterized?
what is event driven software and what is procedural driven software?
Write a program to reverse a given number in c language?
How can I make sure that my program is the only one accessing a file?
Explain how can you determine the size of an allocated portion of memory?
Explain zero based addressing.
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.