what is difference between array and structure?

Answer Posted / ira

Are you sure that Structure is object oriented, because
structs came from C, and C wasn't an object-oriented
program, and C++ was using it at the beginning where now
they use class for the same function which is better

Array is a collection of a fixed number of components all of
the same type: it is a homogeneous data structure.

structs (records) - we use them to group items of different
types; a collection of a fixed number of components in which
the components are accessed by name. The components as
mention can be of different types. A struct is typically
heterogeneous.

Is This Answer Correct ?    82 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to introdu5ce my self in serco

1751


Why flag is used in c?

883


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1465


What is the auto keyword good for?

847


Explain what is a static function?

869


What's the best way of making my program efficient?

855


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1875


Write a program to swap two numbers without using third variable in c?

883


What is the 'named constructor idiom'?

847


What should malloc() do?

867


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

881


What is c mainly used for?

840


What is the use of typedef in structure in c?

736


Explain what is the general form of a c program?

840


What are the types of type specifiers?

819