cybersecurity · intermediate · ~15 min
Spot characters used in SQL injection.
Implement int has_sql_meta(const char *s) returning 1 if s contains a single quote, double quote, semicolon, or the comment marker "--", else 0.
#include <string.h>
int has_sql_meta(const char *s) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.