Files
test-projects/clang/src/main.c
T
2026-02-03 10:02:31 +01:00

27 lines
457 B
C

#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#define STRING_LEN ((size_t) 16)
int main(void)
{
char string[STRING_LEN] = {'\0'};
int n;
for (n = 0; n < (int)STRING_LEN; n++)
{
printf("%2d: [0x%02X]\n", n, string[n]);
}
(void) strcpy(&string[0], "hello there");
printf("\n");
for (n = 0; n < (int)STRING_LEN; n++)
{
printf("%02d: [0x%02X]\n", n, string[n]);
}
}