Skip to main content
2 votes
Accepted

Lecture 2 Arrays

The error you are getting is not saying that you are passing a double instead of a float, but that a double is expected. You are passing average, which is not a variable but a function. Your prototype ...
Robert S. Pratt's user avatar
2 votes
Accepted

Why do computers count from zero?

you can see the following link https://superuser.com/questions/578292/why-do-computers-count-from-zero
MARS's user avatar
  • 5,179
1 vote
Accepted

Lecture 9, how to get default value from `flask.request.get` after submitting a form?

The form method is GET so all parameters are sent in the URL. The python method get finds the key, so does not default to "world". Some ways to change the behaviour: add a test for empty ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Lecture 5 Data Structures Source Code Error

The problem is the free list command following the temp[3] assignment. It breaks the program. At that point, list contains the address of the reallocated memory. So, that memory is deallocated. The ...
Cliff B's user avatar
  • 69.3k
1 vote
Accepted

Purpose of sizeof(book)/sizeof(string) in lectures' binary sort?

That code calculates the number of elements in the array book[]. sizeof(book) is the total size of the array, 72 bytes. Next, remembering that this is an array of pointers to strings ( the CS50.h ...
Cliff B's user avatar
  • 69.3k

Only top scored, non community-wiki answers of a minimum length are eligible