String length · طول سلسلة نصية
String length
A C-string is a row of characters that ends with a hidden null terminator. Return how many characters come before it — basically writing strlen yourself. Walk an index forward until you reach the terminator, counting as you go.
طول السلسلة النصية
السلسلة النصية C هي صف من الأحرف ينتهي بمُنهِي صفر مخفي. أدرِ عدد الأحرف التي تسبقه — basically كتابة strlen بنفسك. مرر مؤشرًا للأمام حتى تصل إلى المُنهِي، مع العد أثناء التمرير.
Complete int str_len(const char *s) to return the length of the C-string s, without using strlen. Count characters until the null terminator. · أكمل int str_len(const char *s) لإرجاع طول سلسلة C النصية s، بدون استخدام strlen. عدّ الأحرف حتى الرمز المنهي الفارغ.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.