Skip to main content

New answers tagged

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
1 vote
Accepted

check50 says program isn't free of memory errors while valgrind says no memory leak is possible in recover.c

I get a different result when I run the program with valgrind. It's showing both an invalid write and memory leaks. $ valgrind ./recover card.raw ==21722== Memcheck, a memory error detector ==21722==...
Cliff B's user avatar
  • 69k
0 votes

CS50 python little professor problem

Thanks for the comment yes the issue was in get_level functions def get_level(): while True: level=input("Level: ") if level in ["1","2","3&...
subhasis dehury's user avatar
1 vote

CS50 python little professor problem

You need to go through the instructions. What do the instructions say to do if they don't provide input for level selection that is numeric or between 1 and 3? You have to resolve the first issue and ...
UpAndAdam's user avatar
  • 1,426

Top 50 recent answers are included