Created
November 5, 2020 13:49
-
-
Save LokeshKumarES/a33bf0a7d83d7e520bc2a855b7b54f5a to your computer and use it in GitHub Desktop.
Lets compare the compilation time for all the four storage classes of variable in c.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//External Storage Class Variable | |
//Speed Test | |
#include<stdio.h> | |
#include<time.h> | |
int i; | |
int main() | |
{ | |
for(i=1;i<=100000000;i++); | |
int ticks=clock(); | |
printf("%f\n",(float)ticks/CLOCKS_PER_SEC); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment