Genesys Cloud Certified Professional – Architect — Question 29
Select the correct format for a literal string expression for the following sentence: He said, “I will schedule the meeting for the specific time zone with AM/PM settings”.
Answer options
- A. “He said, \' I will schedule the meeting for the specific time zone with AM \\ PM settings\’”
- B. He said, I will schedule the meeting for the specific time zone with AM \\ PM settings\
- C. “He said, /" I will schedule the meeting for the specific time zone with AM // PM settings/””
- D. “He said, \" I will schedule the meeting for the specific time zone with AM \\ PM settings\””
Correct answer: D
Explanation
Option D is correct because it uses the proper escape characters for both the quotation marks and the backslashes, maintaining the integrity of the string. Options A and C incorrectly format the quotes or escape characters, while option B fails to include quotation marks around the entire expression, making it invalid as a literal string.