2
votes
Accepted
week7 section linked.c
I thought about this as well today, and your answer to your own question is right. We malloc heap memory to permanently (until you free it once the programme has ended) store a new node. The return ...
2
votes
Accepted
pset6 : cs50 IDE problem starting my server The webpage is not avialable
The website is available on https://ide50-username.cs50.io/
I had the same problem. Try update50 in console.
1
vote
Accepted
survey : ValueError: too many values to unpack (expected 4) in template sheet.html
Your answers is going to be a list of each list of answers (ie, a list of rows). The actual 'title' of those answers isn't in the file.
You only need to iterate over each line and then iterate over ...
1
vote
week7 lecture7 first html file on cs50.io hello.html demands login details
If your workspace is public, it is accessible to anyone on the web without your login details. You can see the setting in CS50IDE -> Go To Your Dashboard.
I reserve the right to change/delete my ...
1
vote
Accepted
Source code from the Week 7 short, "Singly Linked Lists"
It can be found here.
In general,
edX: You can find the source code in Courseware tab > Week X > Lecture / Lecture, continued > scroll down to below the video under Source Code.
Everyone: You can ...
1
vote
Accepted
Week 7 Wednesday lecture list-0.c
Absolutely correct. If search() is the first operation called then the first node variable will be NULL and the loop will not execute.
However, if you inspect the code for insert(), you may see that ...
1
vote
confused by search function in Week 7 "lecture, continued"
I am confused as to why these are both called n. As a result, the line of the search function
Why are they both n?
Well, they could have been called anything he wanted. This was just for ...
1
vote
confused by search function in Week 7 "lecture, continued"
It's common to use the variable n when we are talking about numbers.
That example also help you to realize that even when those data are receiving the same variable name, they won't collide because ...
1
vote
Awkward behaviour of GetInt()
The only reason that GetInt() would return "Retry" is if it recieved a non-integer from standard input (ie, from your keyboard), as the definition says:
/*
* Reads a line of text from standard input ...
Only top scored, non community-wiki answers of a minimum length are eligible