How to calculate the execution time of a program in c?

by Ranganathan 2012-08-28 10:28:25

#include <stdio.h>
#include <time.h>
void main()
{
clock_t start = clock();

/* Code you want timed here..
put your code here,then execute the program,then it will show
the execution time of the program..
*/


printf("Time elapsed: %fn", ((double)clock() - start);

}
933
like
1
dislike
0
mail
flag

You must LOGIN to add comments