Is codomain whatever we make? For example, if I say $f(x) = \ln \left\{ x \right\}$ where $ \{ \cdot \}$ denotes the fractional part function. Is there any way to know the codomain of this function? 
And Now if I define $f : \mathbb{R} \to \mathbb{R}$, now the codomain is $\mathbb{R} $. So is it safe to say, codomain could be anything we want so long as it contains range, if there isn't a codomain already given?
So, $ \sin : \mathbb{R} \to [-1,1]$ is as correct as writing $\sin : \mathbb{R} \to \mathbb{R}$?
So I take it that if domain and codomain aren't given, then I could also say Codomain $\equiv$ Range?
EDIT : What I'm trying to ask is, if it's only a matter of codomain, then every function can be called surjective and conversely every function can be called into function? Which makes it all ambiguous.
I have so many confusions with co-domain, but can anyone just explain me these for the time being? Help is appreciated :) 
 A: There are, unfortunately, two different (though closely related) notions of "function" in common use; I'll call them "function1" and "function2" in this answer, to keep the distinction straight. 
A function1 is just a way of producing, from certain inputs, well-defined outputs. Formally, it is a set of ordered pairs $\langle\text{input, output}\rangle$ no two of which have the same first component. A function1 has a domain (the set of all its inputs) and a range (the set of all its outputs) but no codomain. 
A function2 is a function1 together with specified (domain and) codomain. I put "domain" in parentheses here because a function1 already has a specific domain; only the codomain is new information in a function2. 
There are many functions2 corresponding to any given function1, because we can specify, as the codomain, any superset of the range. I believe this is what you were getting at in the first part of your question.
A function2 is onto if and only if its codomain equals its range.  So, given a function1, of the many ways to make it a function2 by specifying a codomain, just one way will make it an onto function2, namely specify the codomain to be the range of the given function1.
It makes no sense to speak of a function1 being onto. It does make sense to speak of a function1 being onto a specific set $S$; this means that the function1 has range $S$, or equivalently that the function1 becomes an onto function2 if we specify $S$ as its codomain.
(In this answer, I've sacrificed grammar in favor of brevity, using the preposition "onto" as if it were an adjective. People who prefer grammar should substitute "surjective" for all but one of my uses of "onto".)
