Answer:
Swapping two numbers means exchange the values of two variables with each other.
Answer:
b. & Puihaha
Explanation:
PHP variables are supposed to start with a $ sign.
Other rules followed by PHP variables are:
Starting character in variable name (after $) must be letter or _.
Other characters in variable names can be letters,numbers or _.
a. $_Puihaha
c. $Pui_haha
d. $Puihaha
satisfy these rules.
Whereas , b. & Puihaha does not satisfy as it starts with '&'. Moreover it also contains an invalid space character in the variable.
Answer:
1111000
Explanation:
perform the following. write from right to left:
- is the number even? then write down a 0
- is the number odd? then write down a 1 and subtract 1
- divide by 2
- repeat until you reach 0.
So for 120:
120 is even, so write down a 0 and continue with 120/2=60
60 is even, so write down a 0 and continue with 60/2=30
30 is even, so write down a 0 and continue with 30/2=15
15 is odd, so write down a 1 and continue with 14/2=7
7 is odd, so write down a 1 and continue with 6/2=3
3 is odd, so write down a 1 and continue with 2/2=1
1 is odd, so write down a 1 and finish with 0