What Does The Following Segment Of Code Outputp Pre Langc #276
What does the following segment of code output?</p> <pre><code class="language-c"> $string1 = "Hello World\n"; if ($string1 =~ m/(H..).(l..)/) { print "We matched '$1' and '$2'.\n"; }</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs101 Automata Theory. It can also be found in gs gs101 Regular Expressions and Languages - Converting Regular Expressions to Automata - Quiz No.1.
What does the following segment of code output?
$string1 = "Hello World\n"; if ($string1 =~ m/(H..).(l..)/) { print "We matched '$1' and '$2'.\n"; }
We matched ‘Hel’ and ‘ld’
We matched ‘Hel’ and ‘lld’
We matched ‘Hel’ and ‘lo ‘
None of the mentioned
Similar question(s) are as followings:
Online Quizzes of gs101 Automata Theory
Other Classes Of Problems - Randomized Algorithm - Quiz No.1
gs gs101 Automata Theory
Online Quizzes
Push Down Automata - DPDA and Ambiguous Grammars - Quiz No.1
gs gs101 Automata Theory
Online Quizzes