πŸ“Š PHP
Q. What will be the output?
Code:
$x = 5;
echo ++$x;
  • (A) 5
  • (B) 6
  • (C) Error
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (B) 6

Explanation: Pre-increment increments first, then returns value.

Explanation by: Roshan
Pre-increment increments first, then returns value.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1
Total Visits
πŸ“½οΈ
8 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
90%
Success Rate