See if this gives you any ideas.



#include <stdio.h>

int main(void) {
int i, val=0;
char cmd[50]={0};
char str[50]={"imax 1000"};