"String" contains function in C
Just a couple of remarks:


You should add a newline after the last line:

  $ ./nh
  First char match index: 18
  Char: t
  Exist count: 1
  Exist count: 2
  Exist count: 3
  Exist count: 4
  Position: 18 $

I don't know what compiler you use but with when compiled with gcc and -Wall -Wextra -pedantic you get:

gcc -O2 nh.c -lm -o nh -Wall -Wextra -pedantic
nh.c: In function ‘contains’:
nh.c:25:15: warning: unused variable ‘j’ [-Wunused-variable]
 size_t i, j;
           ^

Code formatting should be more consistent. For example, in this line you put a whitespace before needle but don't put a whitespace before haystack:

size_t contains(const char * needle, const char *haystack);

%lu is not a portable specifier for size_t type, you should use %zu introduced in C99.
You said:



  returns the position if it does or 0 if it doesn't, unless the
  position is 0 in which case, it won't be located.


This is really not good. For example, with this it returns 0:

char *needle = "This";
char *haystack = "This is a dinosaurtest.";


With this, it also returns zero:

char *needle = "non-existent";
char *haystack = "This is a dinosaurtest.";


You can't tell the difference between success and failure in this two
examples. Actually, atoi() has the same problem. I don't know what
operating system you use but maybe you could use ssize_t as the
return type if it's available and return -1 in case of failure.