Creates an array with 26 elements and stores the 26 lowercase letters in it. - C Data Type

C examples for Data Type:char

Introduction

Also have it show the array contents.

Demo Code

#include <stdio.h>  

#define SIZE 26  /*from  w  w w . j a v  a2 s  .c o m*/

int main( void )  
{  
    char lcase[SIZE];  
    int i;  
      
    for (i = 0; i < SIZE; i++)  
        lcase[i] = 'a' + i;  
    for (i = 0; i < SIZE; i++)  
        printf("%c", lcase[i]);  
    printf("\n");          
    return 0;  
}

Result


Related Tutorials