va_copy.c 277 B

1234567891011121314151617181920
  1. #include <u.h>
  2. #include <lib9.h>
  3. #include <stdio.h>
  4. void
  5. main(){
  6. char *correct="0.987650\n";
  7. static char result[128];
  8. sprintf(result, "%f\n", 0.98765f);
  9. if(!strcmp(result, correct)){
  10. print("PASS\n");
  11. exits("PASS");
  12. }
  13. else{
  14. print("FAIL\n");
  15. exits("FAIL");
  16. }
  17. }