what is difference between array and structure?

Answer Posted / chaudhary paresh

- Array elements are homogeneous. Structure elements are of
different data type.
- Array allocates static memory and uses index / subscript
for accessing elements of the array. Structures allocate
dynamic memory and uses (.) operator for accessing the
member of a structure.
- Array is a pointer to the first element of it. Structure
is not a pointer
- Array element access takes less time in comparison with
structures.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to count no of words,characters,lines in a paragraph.

3897


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

1778


What are the properties of union in c?

582


What is keyword in c?

595


How to write a multi-statement macro?

616






What is the difference between int main and void main in c?

589


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1115


what is the height of tree if leaf node is at level 3. please explain

1592


Explain the properties of union. What is the size of a union variable

712


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

594


How do you print an address?

738


Is multithreading possible in c?

560


What are the general description for loop statement and available loop types in c?

681


Give the rules for variable declaration?

669


What does the file stdio.h contain?

597