what is difference between array,strutter,union and pointers
Answer Posted / shashidhar
array can contain single data type
Structure is collection of different data types
Unions can also contain different data types, but here the
different date types share the same memory within the
computers memory
ex:
==========================
|| ||
==========================
in the above the memory between || || is shared by int,
float, double declarations in a UNION.
where as in struture || || || the memory
declared for int and float and double are different.
which implies memory utilization is better in union.
When you come to pointers, well it can point to a data type
(like int) can point to a structure (struct xyz{ };) , it
can point to a union (union item { }; ) so its like a honey
BEE it can sit on anything
| Is This Answer Correct ? | 54 Yes | 9 No |
Post New Answer View All Answers
Why c is a mother language?
Which driver is a pure java driver
Is fortran still used today?
How to declare a variable?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
How many types of errors are there in c language? Explain
What is a program flowchart and explain how does it help in writing a program?
Why is c so popular?
What is a pointer in c?
In a byte, what is the maximum decimal number that you can accommodate?
What is the code in while loop that returns the output of given code?
How does struct work in c?
Explain the difference between the local variable and global variable in c?
What does volatile do?
What is the use of #include in c?