Library Functions

Last modified Tuesday, 15-Jul-2025 06:56:54 UTC.
  1. What parameter must you provide to gcc to link in the math library?
  2. How can you find out the range of possible values for each numeric data type?
  3. How can you get the value of Pi?
  4. Does the math library have trigonometric functions?
  5. What function should you call before using the rand function?
  6. What function checks if a character is alphabetic?
  7. What function converts a character to uppercase?
  8. How can you convert a string that looks like an integer, to an integer?
  9. How can you convert a string that looks like a real, to a double?
  10. What's wrong with the strcpy function?
  11. What function is better than the strcpy function?
  12. What function compares strings in alphabetic order, ignoring case?
  13. What is the strtok function used for?
  14. What is the first parameter to strtok the second time you use it?o
  15. What function searches a string for a character?
  16. What function compiles a regular expression?
  17. Name the three standard IO streams
  18. What is the data type of the three standard IO streams?
  19. What is the data type of all IO streams?
  20. What's wrong with gets?
  21. What function should be used instead of gets?
  22. That is the function to open a file?
  23. What does fputs do?
  24. What does fwrite do?
  25. What function detects a (genuine) end-of-file condition?
  26. What function provides random access in a file?
  27. What does fflush do?
  28. If you are nervous, what system call should you use after fflush?
  29. What does sprinf do?
  30. Why did mkstemp replace mktemp?
  31. What function is used to get a piece of memory from the heap?
  32. What function is used to extend a piece of memory taken from the heap?
  33. What function is used to return a piece of memory to the heap?
  34. What is a "memory leak"?
  35. What is a common use for the memset function?
  36. What function provides an error message for the most recent error in a function call?
  37. What functions provide "time travel" in C?
  38. When does UNIX time start?
  39. What function can be used to measure the CPU time used in a program?
  40. What function installs an "exit handler" in a program?