what is difference between array and structure?

Answer Posted / rkv charan

Array:
1.static memory allocation.
2.array size is fixed.
3.array can't have bit fields.

structure:
1.Dynamic memory allocation.
2.structure size is changed dynamically.
3.structure can contain bit fields.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between new and malloc functions?

562


What is an auto keyword in c?

629


What is indirection? How many levels of pointers can you have?

643


What are the advantages of using linked list for tree construction?

626


what is event driven software and what is procedural driven software?

1996






Explain Function Pointer?

671


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

689


What is the argument of a function in c?

557


What is the value of h?

574


When can you use a pointer with a function?

551


What is calloc()?

613


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

641


Explain what is a const pointer?

622


Differentiate abs() function from fabs() function.

585


What is a c token and types of c tokens?

575