Skip to main content

New answers tagged

0 votes

Why am I getting an “invalid slug” message when running check50

Well just in case someone still runs into this, for me the solution was putting exactly the same route indicated, i changed 2022 to 2024 and it wouldn't work just for that reason. An also run the ...
O' Bieito's user avatar
1 vote
Accepted

PSet4, Filter-less blurs but gets a lot darker and doesn't match output

You need to do a full copy of the initial image into copy before you do anything else at all. You are currently encountering consistent and explainable but undefined behavior as you are reading data ...
UpAndAdam's user avatar
  • 1,426
0 votes
Accepted

What is the return value of fread when it reads slack space?

I think you're looking for a problem where none exists. ;-) fread() returns the total number of elements successfully read. This maps to the third parameter in the call. Ideally, it will be the same ...
Cliff B's user avatar
  • 69k
0 votes
Accepted

Speller valgrind test failing

first: this bunch of code in your load function does nothing because the preceeding line you set i=0 for (int j = 0; j < i; j++) { word[j] = 0; } second: ...
UpAndAdam's user avatar
  • 1,426
1 vote
Accepted

Week 5: Speller. Hash function segmentation fault

I suspect that it is failing anytime it tries to hash a word with only one letter. Look carefully at the if statement: if (sizeof(word) < 2) What, exactly, is word? unsigned int hash(const char *...
Cliff B's user avatar
  • 69k
1 vote
Accepted

Wk 1 cash assignment

Something was overlooked. It works when cash is a multiple of 5 because the code doesn't correctly handle the last few pennies. Look at the last if block, lines 35 to 37. This code correctly adds ...
Cliff B's user avatar
  • 69k

Top 50 recent answers are included