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 loop through 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" }; int numFruits = sizeof(fruits) / sizeof(fruits[0]); // Calculate the number of elements in the array //loop through the array using for loop for (int i = 0; i < numFruits; i++) { printf("%s\n", fruits[i]); // '%s' is the formatter for string } return 0; }