Home » C Programming » Strings

What will be the output of the program? #include #include int main() { printf("%d\n", strlen("123456")); return 0; }

Correct Answer: 6

Explanation:

The function strlen returns the number of characters in the given string.


Therefore, strlen("123456") returns 6.


Hence the output of the program is "6".


← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion