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
Can we assign string to char pointer?
What are the advantage of c language?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
How can you tell whether two strings are the same?
Explain why c is faster than c++?
What are the primitive data types in c?
Add Two Numbers Without Using the Addition Operator
Write a program to reverse a string.
Explain how are portions of a program disabled in demo versions?
How can type-insensitive macros be created?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What functions are in conio h?
What are the features of c language?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What is bash c?