Use puts() to output string array - C Data Type

C examples for Data Type:char

Description

Use puts() to output string array

Demo Code

#include <stdio.h>

int main( void ){
    //from  w  w w.  j  ava2 s .  c o m
    char *messages[5] = { "This", "is", "a", "short", "message." };
    
    for (int x=0; x<5; x++)
        puts(messages[x]);

    puts("end!");

    return 0;
}

Result


Related Tutorials