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

Write a Program to find whether the given number or string is palindrome.

980


What is a pointer value and address in c?

821


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

903


What is openmp in c?

782


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3269


What does %c mean in c?

851


What is a spanning Tree?

1249


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

917


List the different types of c tokens?

838


Do character constants represent numerical values?

1082


What is the purpose of & in scanf?

846


What is meant by type specifiers?

881


What are the string functions? List some string functions available in c.

809


What is the correct code to have following output in c using nested for loop?

837


Explain how can I manipulate strings of multibyte characters?

988