Answer: d. Statement 1 is an assertion, Statement 2 is the solution.
Explanation:
The Longest Match rule is a rule which states that whichever lexeme is scanned should always be determined on the support of the longest match available among all the tokens which is accessible. The lexical analyzer used should also follow the rules arrangement, where a reserved word, e.g., a keyword, in a language is given priority over the user input.
Answer:
Option(i) is true
Explanation:
In java arrays, index number of array is of integer type whereas each item of the array needs to be of same type but they can be of any type like string, integer, float etc. Their data type may match with the index's type but needs not necessarily be the same.
For example : arr[4]="Hello" is possible but arr[5]=45 is not legal as arr will contain items of similar data type.
Answer:
Using the Python Programming Language:
def isRed(myString):
if "red" in myString:
return True
else:
return False
Explanation:
The function definition is given above. To output the result of calling this function, we declare a string variable and call the function inside a print statement. See the two lines of code below:
myString= "My house is coloured red"
print (isRed(myString))
Notice that we defined the function called isRed to receive a string as a parameter, Then using the in keyword with an if statement, we check for the presence of the word 'red' in the string that is passed as argument to the function, the function will then return True if the word 'red' is present or False if it is not.
it means to alt f4 then that would help so it can eat the microscope then have it digested