Q. What will be output?

Code:
String S1 = "S1 ="+ "123"+"456";
String S2 = "S2 ="+(123+456);
  • (A) S1=123456, S2=579
  • (B) S1=123456,S2=123456
  • (C) S1=579,S2=579
  • (D) None of This
πŸ’¬ Discuss
βœ… Correct Answer: (A) S1=123456, S2=579
Explanation: If a number is quoted in "" then it becomes a string, not a number any more.
Explanation by: Pooja
If a number is quoted in "" then it becomes a string, not a number any more.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
93
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Pooja
Publisher
πŸ“ˆ
96%
Success Rate