Open In App

Difference between strlen() and sizeof() for string in C

sizeof()

Sizeof operator is a compile time unary operator which can be used to compute the size of its operand.



strlen()

strlen() is a predefined function in C whose definition is contained in the header file “string.h”.



Article Tags :