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
What are external variables in c?
What is d scanf?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is pass by value in c?
What are preprocessor directives in c?
Is c easy to learn?
What are local variables c?
Can you think of a logic behind the game minesweeper.
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
When should volatile modifier be used?
What is dynamic variable in c?
Mention four important string handling functions in c languages .
Explain what standard functions are available to manipulate strings?
What is pointer & why it is used?
What is an expression?