Skip to content
Related Articles

Related Articles

Improve Article

UGC-NET | UGC NET CS 2016 Aug – II | Question 31

  • Last Updated : 11 Apr, 2018

The number of strings of length 4 that are generated by the regular expression (0+1+|2+3+)*, where | is an alternation character and {+, *} are quantification characters, is:
(A) 08
(B) 09
(C) 10
(D) 12


Answer: (C)

Explanation: Possible strings of length 4 are:
0001, 0111, 0011, 0101, 0123, 2323, 2333, 2223, 2233, 2301.
Total 10 strings are possible.
So, option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :