You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c-exercises/positional-format-strings.c

11 lines
240 B
C

#include <stdio.h>
/* suppress "warning: positional arguments are not supported by ISO C" */
#ifdef __clang__
#pragma GCC diagnostic ignored "-Wformat-non-iso"
#endif
int main(void) {
printf("%3$3.2f %2$s %1$s\n", "One", "Two", 3.0);
}