MCQs on our Carousel App

MCQs

1. Which hook is used to track the currently displayed image?
a. useRef
b. useEffect
c. useState
d. useMemo

2. What does the handleUpload function do?
a. Changes button colors
b. Loads CSS files
c. Converts uploaded files into URLs
d. Sends form data to the server

3. Which library handles image animations in the carousel?
a. Axios
b. Tailwind CSS
c. React Router
d. Framer Motion

4. What happens if no images are uploaded?
a. App crashes
b. A default image array is shown
c. A form is shown
d. The carousel disappears

5. How does the app allow direct navigation to a specific image?
a. Through scrolling
b. Through hover effects
c. By clicking thumbnails
d. By dragging images

Answer Key:

  1. c – useState tracks the current image index and uploaded images

     

  2. c – handleUpload maps selected files to object URLs for rendering

     

  3. d – framer-motion powers the animated transitions

     

  4. b – Default images are shown when no uploads are available

     

  5. c – Clicking a thumbnail sets the active image index