Ask Question
7 November, 17:02

Given a String variable named sentence that has been initialized, write an expression whose value is the number of characters in the String referred to by sentence.

+2
Answers (1)
  1. 7 November, 20:53
    0
    Python:

    sentence = "this is the sentence."

    size = len (sentence)

    C++:

    string sentence = "this is the sentence."

    int size = sentence. size ()

    * Remember strings are just arrays of characters.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Given a String variable named sentence that has been initialized, write an expression whose value is the number of characters in the String ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers