**Answer the following two questions and ensure that all code is tested (where possible) using a C/C++ compiler on a UNIX/Linux Development Environment. Evidence of working must be shown and screen shots of tried and tested code must be inserted with your answers.
****This work must be submitted by** **3pm****,** **August 28th 2003****.**
**Both questions carry equal marks.
any files required will be provided, bonus will be given if work is done by the 27th before 8pm
1. On the UNIX platform there are many debuggers available to the systems developer. Often, an executable built from its respective source code performs unexpectedly. The source code given below is part of program that has been built using the *dbx* utility.
a): Bring the source code into a program and build the executable by using the compile option for incorporating the dbx utility. Run the debugger on the executable and indicate the runtime error with the program.
b): Correct the code and rebuild it, but this time without the debugging utility. Capture a screenshot in order to show that the program no longer has the runtime problem.
/* Function: string to integer: converts a char to a integer */
int string_to_integer(char string)
int j, integer_value, result;
for( j = 0 ; string[j] >= '0' && string[j] <= '9'; j++)
integer_value = string[j] - '0';
result = result * 10 + integer_value;
2. Performance is the manner in which or the efficiency with which a computer system meets its goals. The table given below is the output from running a benchmarking program (bench.m) from MATLAB on a user’s Pentium II / 400MHz PC. The results for the user’s computer are labelled as “This computer?? in the table. The respective columns (ODE, LU, Sparse, 3D, 2D) give the execution time comparisons for the user’s computer against other workstations by performing different matrix/graphical functions.
TABLE WILL BE PROVIDED
a): Give a plausible explanation behind the apparent poor performance of the PC concerned and, hence, provide a possible solution to overcome it.
b): Run the function [url removed, login to view] the workstation that you are currently sitting at and capture the results. If there are unexpected results from running this test, give plausible explanations for these results and, hence, suggest solutions to bring the performance of the PC back to its expected ranking.
Table for Question 2
**Answer the following two questions and ensure that all code is tested (where possible) using a C/C++ compiler on a UNIX/Linux Development Environment. Evidence of working must be shown and screen shots of tried and tested code must be inserted with your answers.**