1
<string name="content2">//C Program for Arithmetic Operations\n#include&lt;stdio.h&gt;\nvoid main()\n\tint a=10,b=12;\n\tprintf(\&quot;Addition:%d\&quot;,a+b);\n\tprintf(\&quot;Subtraction:%d\&quot;,a-b);\n\tprintf(\&quot;Multiplication:%d\&quot;,a*b);</string>

Shows the following error

Multiple annotations found at this line: - error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? - error: Unexpected end tag string

1 Answers1

1

As specified here, you need to change your substitution strings from %d to %%d in order to escape the percent symbol correctly.

Community
  • 1
  • 1
Phil
  • 35,852
  • 23
  • 123
  • 164