strlen() computes length of string but char qq[] = {'a' , 'b' , 'c' , 'd'}; is not string. Undefined results are obtained when 'Non-String' data is passed to strlen.
Strings are null terminated in c.
It should be char qq[] = {'a' , 'b' , 'c' , 'd','\0'};