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

the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

646


Do you know the purpose of 'register' keyword?

642


What is difference between scanf and gets?

610


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

756


Why doesnt that code work?

600






Is null always defined as 0(zero)?

615


What is a constant?

633


Is sizeof a keyword in c?

580


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

649


What is gets() function?

667


Explain how can I remove the trailing spaces from a string?

623


Why header file is used in c?

577


Write a Program to accept different goods with the number, price and date of purchase and display them

5447


Explain what are linked list?

623


What is NULL pointer?

675