Can i pass a varible in mysql_query
in c coding .
i am using this one code but it is not successful to compile

String query,acctnbr,amount;

accntnbr = [(whatever the variable is)];
amount = [(whatever the variable is)];

query = "insert into tablename (acctnbr,amount) values (%s,%s)",acctnbr,amount);

what would be the right method to pass a varible in mysql_query?