Example of 1D(one dimensional) array

#include<stdio.h> int main() { int stu[3]; //dataType arrayName[size/number of element]; stu[0] = 2; stu[1] = 3; stu[2] = 4; printf("%d\n",stu[0]); printf("%d\n",stu[1]); printf("%d\n",stu[2]); //printf("%d\n",stu[30]); return 0; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.