2:47 AM !?? Don't you sleep mayjune ??
CrazyGal is right, it's O(n^2), but it would be better to say it's O(n*m).
You see the use of strchr(), which searches for a character inside string b. It performs 'm' operations : matches the character with each char of string b.
As strchr() is executed in each iteration of the "while" loop, total number of operations is n*m.
Hence, the time complexity is O(n*m).
Oops, the loop should be from 32 to 127. (Edited my post)
The idea is to scan the range of "printable" ASCII chars only