1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>

int main(int argc, char* argv[]) {
    char s1[] = "ABC";
    printf("s1 == %s\n", s1);

    char s2[] = { 'A', 'B', 'C', '\0' };
    printf("s2 == %s\n", s2);

    char s3[] = { 65, 66, 67, 0 };
    printf("s3 == %s\n", s3);

    char s4[] = { 0x41, 0x42, 0x43, 0x00 };
    printf("s4 == %s\n", s4);

    char s5[] = { 0101, 0102, 0103, 00 };
    printf("s5 == %s\n", s5);
    
    return EXIT_SUCCESS;
}
/* vim: set tabstop=4 shiftwidth=4 fileencoding=utf-8 noexpandtab: */

© Copyright 2024 Alexander J. Quinn         This content is protected and may not be shared, uploaded, or distributed.