1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rufina [12.5K]
3 years ago
8

What will be the output of the following code? <?php $foo = 'Bob'; $bar = $foo; $bar = "My name is $bar"; print $bar; print $

foo; ?>
a. Error
b. My name is BobBob
c. My name is BobMy name is Bob
d. My name is Bob Bob
Computers and Technology
2 answers:
SCORPION-xisa [38]3 years ago
7 0

Answer: b. My name is BobBob

Explanation:

  • $foo = 'Bob'; // Assigns foo variable the value Bob
  • $bar = $foo; // Assigns the value of foo to bar
  • $bar = "My name is $bar"; //changes the $bar this is the way to  include variables directly in the string.
  • print $bar; // this prints My name is and moves to the variable $bar which prints the value of $bar which is the value of $foo i.e. Bob
  • print $foo; // prints another Bob
Vera_Pavlovna [14]3 years ago
6 0

Answer:

c

Explanation:

error

You might be interested in
What type of hardware and software does Instagram use?
Vlad [161]

Answer:

Social networking platform and  WindowsandroidIOS

Explanation:

Social media mostly uses Social networking platform and  WindowsandroidIOS.

Hope this helps!

Feel free to ask if you have anymore questions!

5 0
3 years ago
Read 2 more answers
write a C++ program that ask the user for the number of cookies eaten and display the calorie consumption
Artyom0805 [142]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int cookies;

   cin >> cookies;

   cout << "The calorie consumption is: " << cookies * 142 << endl;

   return 0;

}

Explanation:

First line: include basic library of C++(input and output).

using namespace std;

Says to compiler we are using std.

int main() Main function

int cookies, cookies variable, of int type

cin >> cookies

get the number of the cookies from user

cout Print the text and calories(one cookie have 142 calories)

Have a nice day ;)

4 0
2 years ago
Dakota's friend Stephen created a cypher using the QWERTY keyboard, but Dakota is confused. Stephen said to move one to the righ
Radda [10]

Answer:

people are so confusing nowadays... Mr. Kopin told me to get him a coffee. I'm not his servant!

Explanation: QWERTY Q=P A=L Z=M and the others are what is to the left of them.

5 0
3 years ago
The rod and crankshaft convert the up-and-down motion of the piston into
OLEGan [10]
Yes and that is correct
7 0
3 years ago
Read 2 more answers
1st answer will get brainliest!
valentina_108 [34]

The answer is program!

5 0
2 years ago
Read 2 more answers
Other questions:
  • What is the order of arrangement of files and folders on a computer?
    15·1 answer
  • Does time complexity depend on, which base arithmetic you use? like base 10, 2 or whatever else? Does time coplexity depned on t
    13·1 answer
  • Which table attributes would this code produce?
    15·1 answer
  • How come I haven't moved to the next rank even though I have all of the right things to move on?
    10·2 answers
  • I have been charged for brainly plus yet I still have to watch ads why? What do I do?
    12·2 answers
  • What Is entered into the system as input?
    13·1 answer
  • Explain two ways by which the calendar meets or fails to meet the criteria of showing the correct data
    7·1 answer
  • What happens to runt frames received by a cisco ethernet switch?
    12·1 answer
  • One of 34 possible _________________ can be assigned to each axis of classification in the seven-character code.
    12·1 answer
  • Which tool uses images and other visual elements to provide artistic
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!