πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Country1 = "1";
$Country2 = "1";
echo "$Country1" + "$Country2";
?>
  • (A) 2
  • (B) 11
  • (C) 0
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (A) 2
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Country1 = "INDIA";
$Country2 = "1";
echo "$Country1" + "$Country2";
?>
  • (A) INDIA
  • (B) 1
  • (C) INDIA 1
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Country1 = "INDIA";
$Country2 = "INDIA";
echo "$Country1" + "$Country2";
?>
  • (A) INDIA
  • (B) INDIA INDIA
  • (C) Error
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (D) 0
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Country1 = "INDIA";
$Country2 = "USA";
echo "$Country1" + "$Country2";
?>
  • (A) INDIA
  • (B) 0
  • (C) Error
  • (D) USA
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Team1 = "Chennai Super King";
$Team2 = "Mumbai Indian";
echo "$Team1 " . "$Team2";
?>
  • (A) Chennai Super King
  • (B) Error
  • (C) Mumbai Indian
  • (D) Chennai Super King Mumbai Indian
πŸ’¬ Discuss
βœ… Correct Answer: (D) Chennai Super King Mumbai Indian
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$name1= Ajit;
$name2= Rahul;
echo "$name1"."$name2";
?>
  • (A) Ajit
  • (B) Rahul
  • (C) AjitRahul
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (D) Error
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Name = "Rahul";
$Name = "Ajit";
echo "$Name";
?>
  • (A) Error
  • (B) Rahul
  • (C) Ajit
  • (D) Nothing
πŸ’¬ Discuss
βœ… Correct Answer: (C) Ajit
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Country= India;
echo "$Country" . India;
?>
  • (A) nothing
  • (B) error
  • (C) India
  • (D) IndiaIndia
πŸ’¬ Discuss
βœ… Correct Answer: (B) error
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
/*
echo "Hello MCQ Buddy";
*/
?>
  • (A) Nothing
  • (B) /* Hello MCQ Buddy */
  • (C) Hello MCQ Buddy
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) Nothing
πŸ“Š PHP
Q. What will be the output of the following PHP code ?
Code:
<?php
$Name= Ajit;
echo "$Name";
?>
  • (A) Ajit
  • (B) Error
  • (C) $Name
  • (D) Nothing
πŸ’¬ Discuss
βœ… Correct Answer: (C) $Name