Initializing an array of pointers to type char. - C Pointer

C examples for Pointer:Array Pointer

Description

Initializing an array of pointers to type char.

Demo Code

#include <stdio.h>

int main( void )
{
    char *message[8] = { "test", "test test", "test test test", "aaaa", "aaaaaa", "bbbbbb,", "cccccc", "eeeeee" };
    int count;//from  w ww  .j  a va2  s  .  com

    for (count = 0; count < 8; count++)
        printf("%s ", message[count]);
    printf("\n");

    return 0;
}

Result


Related Tutorials