CS FundamentalsHardWipro · Cognizant technical pattern

According to Semantic Versioning precedence rules, which list is in correct ascending order?

  1. A. 1.0.0 < 1.0.0-alpha < 1.0.0-beta < 1.0.0-rc.1
  2. B. 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0
  3. C. 1.0.0-alpha.1 < 1.0.0-alpha < 1.0.0-beta < 1.0.0
  4. D. 1.0.0-rc.1 < 1.0.0-beta < 1.0.0-alpha < 1.0.0

Correct answer: B. 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0

A pre-release version is lower than the same version without a tag, so 1.0.0 is highest. Pre-release identifiers compare alphabetically (alpha < beta < rc), and a longer list with the same prefix is higher (alpha < alpha.1).

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic