what is difference between array and structure?

Answer Posted / sreejith av

ARRAY:
An array is defined as a group of related data items stored by means of a single variable name.

STRUCTURE:
Structure is defined as a data type to represent several different types of data with a single name.

DIFFERENCE BETWEEN ARRAYS AND STRUCTURES:
1.All data in a array should be of same data type.But in structures data can be of different data types.
2.Individual entries in an array are called elements.But in structure individual entries are called members.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why functions are used in c?

574


What is #error and use of it?

664


Why can't I perform arithmetic on a void* pointer?

626


is it possible to create your own header files?

626


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

613






What are c header files?

568


explain what is fifo?

624


What is sizeof int?

627


how to find anagram without using string functions using only loops in c programming

2706


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

1729


What does the characters “r” and “w” mean when writing programs that will make use of files?

841


Explain #pragma statements.

595


What is masking?

627


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3104


How do you determine the length of a string value that was stored in a variable?

642