Ubuntu sqlite3 段错误
{ char inser[100]; char *sql; printf("请输入数据:name(text):"); scanf("%s",name); printf("%s",name); sprintf(sql,"insert into bike(name) values('%s')",name); sqlite3_exec(db,sql,0,0,&zErrMsg); sqlite3_free(zErrMsg); return 0; } 总是提示 段错误
补充:char inser[100] 写错了 char name[50]