📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Complete the C function to calculate the length of a null-terminated string s without using strlen. int custom_strlen(const char*
      s) {     int length = 0;     while (_________ ) { // Line to complete         length++;     }     return length; }

      A s[length] != '\0' Correct Answer Incorrect Answer
      B s[length] == '\0' Correct Answer Incorrect Answer
      C s != NULL Correct Answer Incorrect Answer
      D s[length] Correct Answer Incorrect Answer
      E *s != '\0' Correct Answer Incorrect Answer

      Solution

      The correct answer is A

      Practice Next
      ask-question