xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to create an array in C
C Online Editor
Execute Code
More C Sample Codes
#include <stdio.h> int main() { // Creating a string array in one line using array declaration syntax const char* fruits[] = { "Apple", "Banana", "Cherry", "Orange", "Watermelon" }; // Accessing an array element printf("%s\n", fruits[2]); // Output: Cherry // Creating an integer array in one line using array declaration syntax int numbers[] = { 1, 2, 3, 4, 5 }; // Accessing an array element printf("%d\n", numbers[2]); // Output: 3 return 0; }