feat(c23): Implement %b and %B format

This commit is contained in:
GrayJack
2025-03-22 20:15:56 -03:00
parent 78d7d66839
commit c7d94ae4d7
4 changed files with 31 additions and 10 deletions
+6
View File
@@ -90,4 +90,10 @@ int main(void) {
res = asprintf(&s, "test %s %d", "string", 2);
printf("printed: %s, value: %d\n", s, res);
free(s);
puts("\nC23:");
printf("Binary %%b: %b\n", 4);
printf("Binary %%b alternate: %#b\n", 4);
printf("Binary %%B: %B\n", 4);
printf("Binary %%B alternate: %#B\n", 4);
}