what is difference between array and structure?

Answers were Sorted based on User's Feedback



what is difference between array and structure? ..

Answer / kirankumar

Array takes data types of same kind where as structure takes
any kind.
Ex:int n[5];/* one d array
int n[10][10];/* two d array
int n[10][10][10];/* multi d array or jagged array
Structure takes following form:
struct class
{
cahr name;
int marks;
float sbuject[3];
}stuent[100];

Is This Answer Correct ?    1 Yes 1 No

what is difference between array and structure? ..

Answer / tsering dolma

array is collection of same data.
structure is collection of hetogenous data

Is This Answer Correct ?    0 Yes 0 No

what is difference between array and structure? ..

Answer / tsering dolma

1. Array is collection of homogenous data and
structure is collection of hetogenous data

Is This Answer Correct ?    0 Yes 0 No

what is difference between array and structure? ..

Answer / shiva

arry is derived data type,
structure is user defined data type

Is This Answer Correct ?    0 Yes 0 No

what is difference between array and structure? ..

Answer / adilakshmi

Array elements are homogeneous type.
Structure elements are different data type.
Array is the pointer to the first element.
Structure is not a pointer.

Is This Answer Correct ?    0 Yes 0 No

what is difference between array and structure? ..

Answer / 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

what is difference between array and structure? ..

Answer / viji

array is the collection of same data items are declare under
common name

structure is the collection of different data items are
declare under different name which are accessed under common
name.

Is This Answer Correct ?    0 Yes 0 No

what is difference between array and structure? ..

Answer / monishasyed

Array is same data type
it can not bit field
it has the base pointer
structure is the different data type
it can bit field
it has the poiter

Is This Answer Correct ?    0 Yes 0 No

what is difference between array and structure? ..

Answer / dhivya

when we are declaring an array a variable is enough with
the size.
when we are declaring structure it contain different data
types.

Is This Answer Correct ?    16 Yes 18 No

what is difference between array and structure? ..

Answer / kirankumar

Array is used to represent a group of data items that
belongs to the same type or kind.
int a[5];
i.e a[0],a[1],a[2],a[3],a[4].
all a values are integer types.


If we want to represent data items of different types using
a single name is called strucute.
Ex:struct book
{
char title[20];
int pages;
float price;
};

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C Interview Questions

What is the significance of scope resolution operator?

0 Answers   Agilent, ZS Associates,


How can I find the day of the week given the date?

0 Answers  


Can a program have two main functions?

0 Answers  


1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

0 Answers   TCS,


What is operator precedence?

0 Answers  






What's the right way to use errno?

0 Answers  


What is Generic pointer? What is the purpose of Generic pointer? Where it is used?

3 Answers  


a value that does not change during program execution a) variabe b) argument c) parameter d) none

0 Answers  


When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these

1 Answers   Accenture, IBM,


There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.

5 Answers   Yahoo,


What does 2n 4c mean?

0 Answers  


Write a programm such that if user enter 11.25 it roundup to 11 but if user enter 11.51 upto 11.99 it will round up to 12 i.e.;convert the floting point value into integer format as explain above..

2 Answers  


Categories