Okay guys so when are we going to discuss what's static functions are static functions as a way of making
a function only available to the source file it's in.
So to demonstrate this let's first create a new file called test out C and we're gonna have integer
my sum and a integer B which is going to return A plus B.
And so we don't have to create a head to file let's copy this and we're going to paste it up here once
again just so it is just so may not see is aware that my sum exists somewhere and I want you I now want
you to do is to resolve equals my sum five and ten and we're gonna go print f I folks back session result.
So this so print the result which is 15 because my sum will add those two together and then we output
the result which is 15.
Now compile that now we'll first compile test of C GCSE test out C dash show test 0 Darcy for object
file and now do GCSE main up C test Oh dash so main if you have one main you see 15 now go into test
start C and put static at the beginning of here that's all I wanted to do and I recompile test out C
we compile main dot c and you can see undefined reference to my sum.
Now this is because my sum is static which means that it will not be compiled into the object file the
object file won't have a reference to explain that my sum is here so mean that c what.
Even though we link it with test.
Oh it cannot resolve my some symbol.
So by using static we make it only available in test C.