Advertisement
M4ritimeSeeker

KAHOOT WEEK 8 SPRING 2022 ANSWERS

Mar 8th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. KAHOOT WEEK 8 SPRING 2022 ANSWERS
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. Question 1: What does the sqrt function stand for?
  9. Answer: square root
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. Question 2: What library do you need to use functions like pow() and sqrt()?
  17. Answer: math.h
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. Question 3: The pow() function deals with exponents.
  26. Answer: True
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. Question 4: Assuming 'var' is an integer, which of the following is the proper use of pow()?
  34. Answer: pow(var, 2)
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. Question 5: What does a random number generator need in order to be random?
  43. Answer: A Seed
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. Question 6: srand is used for generating a random number, while rand is used to seed.
  51. Answer: False
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Question 7: What is the range of the following random number generator?: rand() % 11
  59. Answer: 0-10
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. Question 8: Which statement correctly generates a random number between 1 and 10 (inclusive)?
  67. Answer: rand() % 10 + 1
  68.  
  69.  
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement