1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers in ascending order. Write down in a table the time (according to your system clock) that it takes for the program to complete. You may do this by running the program for several values of input.

Hints: a) Write full source code b) Use system clock to measure the running time c) Use several input (eg: N = 100 , N = 1000 , N = 10000, N = 100000 etc) d) Have access to a file (to store your running time)

2) What is the difference between static and dynamic memory allocations? List advantages and disadvantages for the both type of memory allocations.

3) Use structure to wrap student information (such as Matrix Number, name and MTS 3023 mark) and manipulate it by reading information to an array of student structure and print them on to console screen.

4) The common error message which might encounter in your program is ?memory access violation? or ?segmentation violation?. What does it mean? How to avoid it?

5) For each of the following four program fragments: a. Give an analysis of the running time (Big-Oh) b. Implement the code and give the running time for several values of N c. Compare your analysis with the actual running times\

*who can help me please sent your answers in my emel~<email removed>

Edited by Narue: Snipped email

6 Years
Discussion Span
Last Post by Narue

none will do your homework unless you at least try and tell us what you don't know, if you know nothing about how to do it, too bad, go and learn

Edited by dospy: n/a


please help me friends....huhuhuhu... im so need this answer now for present tomorrow....huhuhu


please help me friends....huhuhuhu... im so need this answer now for present tomorrow....huhuhu

This thread is now closed as it's in violation of our homework rule.

Edited by Narue: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.