I’m passing as input to my program: "<param value=s/>"
I use this code:
char character[1];
sscanf(data, "<param value=%c/>", &character);
printf("%c", character);
However the output seems to be “s/>” instead of only “s” char.
what’s wrong here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your code is correct, but you need to output
character[0]:You should drop the address operator in front of
character, though, assscanf()expects an argument of typechar *and notchar (*)[1]: