what is an array

Answers were Sorted based on User's Feedback



what is an array..

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

what is an array..

Answer / anusha

an array is a continous memory of same data type.

Is This Answer Correct ?    2 Yes 0 No

what is an array..

Answer / j j ramesh

it is the ordered collection of same type of variable.
accessed by index value range starts from 0

Is This Answer Correct ?    1 Yes 0 No

what is an array..

Answer / mukul garg

an array is a collectiom of similar data types .an array
index always stsrt from zero if the size of array is n then
it can store n elements .
int a[5]={1,2,3,4,5};

Is This Answer Correct ?    1 Yes 1 No

what is an array..

Answer / jyoti

An Array is a Drived data type

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

when to use : in c program?

2 Answers  


How to calculate sum

2 Answers  


What is the difference between if else and switchstatement

0 Answers  


# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none

7 Answers   Microsoft, TCS,


Write a program to find the number of times that a given word(i.e. a short string) occurs in a sentence (i.e. a long string!). Read data from standard input. The first line is a single word, which is followed by general text on the second line. Read both up to a newline character, and insert a terminating null before processing. Typical output should be: The word is "the". The sentence is "the cat sat on the mat". The word occurs 2 times.

0 Answers  






Explain the difference between getch() and getche() in c?

0 Answers  


Explain the use of keyword 'register' with respect to variables.

0 Answers  


What will be the result of the following program? char*g() { static char x[1024]; return x; } main() { char*g1="First String"; strcpy(g(),g1); g1=g(); strcpy(g1,"Second String"); printf("Answer is:%s", g()); } (A) Answer is: First String (B) Answer is: Second String (C) Run time Error/Core Dump (D) None of these

2 Answers   Oracle,


How do you view the path?

0 Answers  


Explain #pragma statements.

0 Answers  


Differentiate Source Codes from Object Codes

1 Answers  


how to write a c program to print list of fruits in alpabetical order?

0 Answers  


Categories