Hot answers tagged

4 votes
Accepted

When we free a dynamically allocated memory, what happens to the pointer pointing at it?

Yes, when you use a free(px); call, it frees the memory that was malloc'd earlier and pointed to by px. The pointer itself, however, will continue to exist and will still have the same address. It ...
user avatar
  • 64.2k
2 votes
Accepted

Should I Watch the Sections and Walkthroughs?

Absolutely - of course! If you're kind of new to CS you'll realise why very quickly. You'll also find technical help (only) here and technical, practical and moral support help on the CS50 Facebook ...
user avatar
  • 151
1 vote

Swap initialised in Bubble sort

The var swaps is used to detect whether any swaps occur, not to control whether the code displayed on the screen is allowed to run. Here's how it works. You want to know if any swaps ever occur. At ...
user avatar
  • 64.2k

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