Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
Introduction [cont'd]
Input Output Functions [cont'd]
Structures and Unions [cont'd]
# Preprocessor [cont'd]
What is Array? in Arrays of Programming in C
2166 Views
What is Array? 
Set of similar type of values are stored by the same name by index, which is called as Array.
Syntax 
datatype variable_name[size];
Program
#include
void main(){
    //Allocates memory for 0 to 2 index
    int numbers[3];
    int i;
    //Assigning values to array variables by specific index
    numbers[0] = 10;
    numbers[1] = 20;
    numbers[2] = 30;
    //Displaying numbers array values
    for (i=0;i<3;i++)
    printf("%d - %d",i,numbers[i]);
}
Output 
0 - 10
1 - 20
2 - 30
Next Topics
Next lessons of current book.
Previous Topics
Previous lessons of current book.
Looping Statements of Programming in C
Looping Statements of Programming in C
Looping Statements of Programming in C
Looping Statements of Programming in C
Looping Statements of Programming in C
Best Lessons of "Programming in C"
Top lessons which are viewed more times.
Structures and Unions of Programming in C
Input Output Functions of Programming in C
Structures and Unions of Programming in C
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details