Q. What will be the output?

Code:
echo (int)(bool) 'false';
  • (A) 0
  • (B) 1
  • (C) false
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1
Explanation: Non-empty string is true → (int)true = 1.
Explanation by: Roshan
Non-empty string is true → (int)true = 1.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
42
Total Visits
πŸ“½οΈ
6 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
80%
Success Rate