what is an array

Answer Posted / srsabariselvan

an array is a collection of same type of data.
for eg:
list of student name,collection of roll numbers.
each element has unique id(index).
Declaration:
data_type a[size];
a[index]=number;
Eg:
int a[10];
a[0]=2;
a[1]=3;
.
.
.
a[9]=22;
printf("%d",a[9]);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between Structure and Unions?

644


How can I remove the trailing spaces from a string?

619


What is a good data structure to use for storing lines of text?

604


Why isnt any of this standardized in c?

641


Explain how do you use a pointer to a function?

642






Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

670


What are keywords in c with examples?

612


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

1433


How would you rename a function in C?

625


Can you add pointers together? Why would you?

651


What is the use of parallelize in spark?

582


Is c a great language, or what?

608


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

683


What is a memory leak? How to avoid it?

580


How to declare pointer variables?

689