Week03 Lab Notes
Week03 Excercise 1 / COURSEWORK 1
To Be Noted: This exercise is also coursework1
It MUST BE SUBMITTED to onlinegdb.com as well as Blackboard
Deadline: 12:00PM 21st March 2025
Important : The sample ouput is wrong
The correct sample output is
{data: 10, priority: 1}
{data: 22, priority: 2}
{data: 39, priority: 3}
{data: 62, priority: 4}
{data: 92, priority: 5}
{data: 74, priority: 6}
{data: 55, priority: 7}
{data: 40, priority: 8}
{data: 30, priority: 9}
{data: 20, priority: 20}
The previous sample output was wrong
About the Q&A session for coursework 1
You may be asked to explain your code
You may be asked to draw diagrams to show your data or algorithm
You may be asked to change several lines of your code
Fail to complete those tasks may result in failure of your coursework 1
free() a pointer
free() frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc(), calloc() or realloc(). Otherwise, or if free(ptr) has already been called before, undefined behaviour occurs. If ptr is NULL, no operation is performed.
Last updated