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
How do I get an accurate error status return from system on ms-dos?
What is nested structure with example?
What is memory leak in c?
When can a far pointer be used?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
What is a macro?
What is the difference between strcpy() and memcpy() function in c programming?
How many bytes are occupied by near, far and huge pointers (dos)?
What is the code for 3 questions and answer check in VisualBasic.Net?
How can I read and write comma-delimited text?
What extern c means?
What is the use of bitwise operator?
How can you determine the maximum value that a numeric variable can hold?
what does static variable mean?
What is void pointers in c?