Question: Q1- Why is this assignment statement invalid? $res = the value is .$x + $y. pounds; Q-2 What sequence of characters will be displayed on
Q1- Why is this assignment statement invalid?
$res = "the value is ".$x + $y." pounds";
Q-2 What sequence of characters will be displayed on the user's screen as a result of printing each of these strings? Assume that variable $xyz has the value 296.4.
(a) 'I live at 26 Queen\'s Road'
(b) 'My name is John O'Brien'
(c) 'This is a backslash\\'
(d) "I live at 26 Queen\'s Road"
(e) "My name is John O'Brien"
(f) "This is a backslash\\"
(g) "He said \"Hello\" to me"
(h) "the value of the variable is $xyz"
(i) "the value of the variable is $xyzpounds"
(j) "a strange string \t\t \t\tabc\$xyz $xyz here is a backslash\\"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
