What is the difference between struct and union in C?
Answer Posted / hrpynux@gmail.com
A struct is a block of memory that stores several data objects, where those objects don't overlap. A union is a block of memory that stores several data objects, but has only storage for the largest of these, and thus can only store one of the data objects at any one time.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is binary tree in c?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
Tell me about low level programming languages.
explain what is an endless loop?
how can use subset in c program and give more example
How many parameters should a function have?
What is the use of extern in c?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Why clrscr is used in c?
What is register variable in c language?
write a program to rearrange the array such way that all even elements should come first and next come odd
Why c is a mother language?
Write a program of prime number using recursion.
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
Explain 'bus error'?