How to write below code in C? Also: is there any built in function for checking length of an array?
Python Code
x = [\'ab\', \'bc\'
There is a function for finding string length. It is strlen from string.h
strlen
string.h
And then you could use the strcmp from the same header to compare strings, just as the other answers say.
strcmp