locale.c 313 B

12345678910111213
  1. #include <locale.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. int main() {
  5. // TODO: Implement locale properly and test it here
  6. char* val = setlocale(LC_ALL, NULL);
  7. if (strcmp(val, "C") == 0) {
  8. puts("success!");
  9. } else {
  10. printf("setlocale returned the wrong value: %s", val);
  11. }
  12. }