what is array?

Answer Posted / geetha gajendiran

array is a collection of similar data types;
i can explain with following example:
#include<stdio.h>
void main()
{
int x;
x=5;
x=10;
printf("\nx=%d",x);
}
here 10 is assigned to x.thereby 5 get lost.this is
applicable when only one value is stored.

but,if we want to store more than one value at a time in a
single variable.we go for using the array

suppose we want to arrange the payment of 100 workers in
ascending order.we have 2 options
1)construct 100 vari8ables to store the payment amount
obtained by 100 different workers.
2)construct one(1) variable (called array or subscripted
variable) capable of storing or holding all the hundred
values.


for more question and answers regarding computer
engineering please mail to me.

Is This Answer Correct ?    20 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe how arrays can be passed to a user defined function

778


Why we use stdio h in c?

575


Explain modulus operator.

593


What is the right type to use for boolean values in c?

581


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2005






Is fortran still used today?

600


What is a protocol in c?

555


What is the size of empty structure in c?

590


What is call by reference in functions?

561


What are the disadvantages of a shell structure?

686


Do variables need to be initialized?

617


Explain heap and queue.

578


When is a void pointer used?

673


Explain what is the benefit of using an enum rather than a #define constant?

717


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

5794