ISRO Computer Science (CSE) 2025 - Question 28

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2025

Topic: Theory of Computation

Which of the following hexadecimal constants match the regular expression given?
$(0x[0-9A-F]+)$

  • A. $0x4C5$
  • B. $0x50b$
  • C. 04A
  • D. 0x

Answer: A. $0x4C5$

Explanation: The regular expression specifies the string must start with '0x', followed by one or more (+) characters from the set 0-9 or uppercase A-F. Option (b) contains a lowercase 'b', violating the character class. Option (c) lacks the '0x' prefix. Option (d) lacks the trailing hexadecimal digits. Option (a) perfectly matches.

| | All questions of ISRO Computer Science (CSE) 2025