Parse Simple Command String
Write a C function to parse a simple command string of the form CMD=VALUE. The function returns the integer VALUE and validates that CMD matches expected keyword.
Constraints
- Expected CMD="SPEED".
- Input form "SPEED=100".
- Return -1 on invalid format.
- Use strtok or manual parsing.
1int parse(const char* s);