two year course is correct and is used as an adjective (known as a compound adjective) to describe the length of the course which in this case is two years long.
Other examples of compound adjectives are: a three day weekend.
a four metre rope.
a six cylinder engine.
a three year vacation.
Compound adjectives can be hyphenated or separated with spaces.
ell.stackexchange.com/users/57606/user242899
I do not know what you mean by "the answer is."
This gets into the weeds of descriptive versus prescriptive grammar.
The first thing to realize is that "two years course," "two year's course," and "two years' course" sound exactly alike.
In terms of spoken English, you will hear that set of sounds frequently enough to consider it idiomatic.
You will also hear "two year course," which is indistinguishable from "two-year course," so that sound combination is idiomatic as well.
From a prescriptivist orientation, it is preferable to write "two-year course."
The noun phrase "two-year" is being used as an adjective to modify "course.", and adjectives in English do not form plurals or possessives.
ell.stackexchange.com/users/64237/Jeff Morrow
As others have said, the idiomatic answer is that you form an adjective phrase "two-year" to describe something relating to a period of two years (the plural is always dropped in this sort of construction).
The hyphen ought to be used, though many people will write it without one.
See this table from the Chicago Manual of Style (which includes "fifty-year" on page 2).
However, sometimes you will see similar phrases with a possessive construction.
Some that spring to mind are "two weeks' notice" or "eight hours' sleep".
The difference from your example is that here the time is quantifying how much notice/
sleep you get, and I don't think you will see this construction except where you would ask something like "How much XYZ do you have?"
(You wouldn't say "How much course has Suresh joined?")
No-one has yet pointed this out, but your option (1) would be wrong even for this construction because your apostrophe is in the wrong place: for the possessive of a plural ending in "s" like "years", put the apostrophe after the "s".
ell.stackexchange.com/users/37000/Especially Lime
two year (or "two-year") describes the duration of something, and sounds natural when used to modify "course" as if "two year" was an adjective.
This means a course which lasts for two years; it's common enough to see modifiers like this used in an uninflected form (plain "year"), rather than an inflected form.
two year's refers to the end-point of something.
Side note, this is more properly written as two years' , since the "two" means that "years" needs to be plural.
This one isn't normally used with a noun like "course"; instead, it would much more common to hear it with "time".
e.g., "Suresh has joined a course which ends in two years' time".
The version with the apostrophe could in theory be used as a straightforward possessive, but I can't think of any idiomatic cases where we do that in English with time durations.
And lastly, two years refers to a duration on its own.
"a course lasting two years", for instance.
ell.stackexchange.com/users/32627/Ethan Kaminski
You should know that the apostrophe in the first answer makes it into the genitive case.
Then it would mean "belonging to the two year", which does not make sense.
It is a common mistake these days, but it is still totally wrong.
It started with fruit sellers labelling their wares "apple's" and "pear's"; nobody knows why they suddenly started making this error.
So it is called "greengrocers' apostrophe".
Edit: corrected
ell.stackexchange.com/users/9436/RedSonja
Suresh has joined a _____ course.  Options:  1) two year's  2) two years  3) two year  the answer is two year.but two year's sounds to me more logical.can you explain the nuance?thanks in advance.
two year or two year's
ell.stackexchange.com
<sentence-construction>
ell.stackexchange.com/questions/149140
ell.stackexchange.com/users/65170/kumar
Using the apostrophe would mean "belonging to the two year", which does not make sense. This common mistake started with fruit sellers labelling their wares "apple's" and "pear's", and nobody knows why they suddenly started making this error. As a result,  it is called a "greengrocers' apostrophe". You ought to know that the apostrophe makes it into the genitive case in the first answer
You ought to know that the apostrophe makes it into the genitive case in the first answer.
Then it would mean "the two year," which makes no sense.
These days it's a common mistake, but still completely wrong.
It began with fruit sellers labeling their products 'apples' and 'pears'; no one knows why they suddenly made this mistake.
It is therefore called the 'apostrophy of greenhouses.'