id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

String OperationsStrlen3

prev  |  next  |  chance

length() returns the length of a string.

public static int strlen(String s, String t) {
    int length = 2 * s.length() + 3 * t.length();
    return length;
}
Function Call  Return Value
strlen("ant", "duck")
strlen("", "")
strlen("", "78")
strlen("rock", "sand")
strlen("ex", "ball")

Experiment with this code on Gitpod.io

⬅ Back