Assignment 01 Using GNU Profiler
Assignment 01 Using GNU Profiler
BSCIS – PIEAS
Objectives
Lab Tasks
2. You need to describe functionality of each function and also overall functionality of program
#include <stdlib.h>
#define N 19999
int main ( )
{
int i , j ;
j = 0 ;
for ( i = 0 ; i <= N; i++)
{
j = func1 ( j ) ;
}
return ( j ) ;
}
Compile my_program.c
gcc -pg my_program.c
./a.out
Analyze my_program.c
gprof a.out
Deliverables
You don't need to submit separate document. Simply observe and write in text box provided for this
assignment submission.
Zero tolerance policy for plagiarism. Please come with your own code no matter how bad is it.