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 motivates high school students to join professional organizations?
Jet001 [13]
Having a good curriculum, learning more about something that you like, helping people. It also depends on what professial organization students wanna join. 
8 0
3 years ago
Read 2 more answers
Identify two real-world examples of problems whose solutions do scale well
stellarik [79]

Explanation:

We should see scaling well as referring to problems that can well be solved using computation. Two real-world examples are:

  • problems involving finding the largest or smallest of several lists of numbers: Usually, a simple program executed to lookup the data set to determine which number fits the properties needed.
  • problems involving equations: By computing the variables (x, y, etc) that make up the equation, and the operations (eg, addition, division) to be performed on the variables the problem can be solved well.
3 0
3 years ago
Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-referenc
morpeh [17]

Answer:

b. TRUE

Explanation:

Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-reference parameter passing scheme.

This is because , assuming a pass by value semantics would require us to copy the value of the istream or ostream object which would be meaningless. In fact these objects don't even have a copy constructor at all. So such objects are always passed by reference.

7 0
3 years ago
FILL IN THE BLANK
Gwar [14]

Answer:

search

Explanation:

4 0
3 years ago
Given the declaration
STALIN [3.7K]

Answer:

False

Explanation:

There's only one component of the array list which is list[0] which has value 50

7 0
4 years ago
Other questions:
  • Arpanet was developed by the united states so that there was a communication network that would survive a nuclear war. True or F
    11·1 answer
  • Normal or random variations that are considered part of operating the system at its current capability are ______: ​ a. systemic
    7·1 answer
  • _____ is a technique that combines the strongest features of Wired Equivalent Privacy (WEP) and Extensible Authentication Protoc
    11·1 answer
  • What kind of storage is an internet service that provides storage to computer users?
    12·1 answer
  • Write a function to prompt the user to enter the information for one movie (title, release date, mpaa rating and number of stars
    8·1 answer
  • Which statement describe the advantages of using XML? more than one answer can be correct
    9·1 answer
  • You're expecting visitors who will be demanding Mamet access Before they arrive, you can activate a Guest network that has its o
    11·1 answer
  • Calculate the value of z. Given v=4, w=5, x=8, y=2z= (v+ w) * x / y;print (“value of z is “, z)
    8·1 answer
  • Ali has created a small program in Python, but he wants to store his data in a multi-dimensional array. He would like to use adv
    8·1 answer
  • Which of the following commands appears in the INSERT menu or tab?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!