- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
IT, Programming, & Web Development › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 2: [Arrays] – Functions, Variable and Scope, Debugging, Arrays, and Command Line Arguments › Understanding Scrabble Lab problem
Tagged: arrays, pointers, scrabble lab problem
Just started with the Scrabble Lab.
[dm_code_snippet background=”yes” background-mobile=”no” slim=”yes” line-numbers=”yes” bg-color=”#abb8c3″ theme=”dark” language=”clike” wrapped=”yes” height=”” copy-text=”Copy Code” copy-confirmed=”Copied”]
int POINTS[] = {1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 1, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10};
[/dm_code_snippet]
How the given code assigns a to 1, b to 3, …, z to 10? Is POINTS a variable, which is programmed to assign values to letters of the alphabets? Else, I am not sure how POINTS can relate a to 1, b to 3.
Reply
https://edstem.org/us/courses/176/discussion/820678?answer=1886037[learn_press_profile]