1) This
scanf_s("%d%d", &num1, &num2);
will hardly work since it searches for two consecutive integers, like "32345". It sees one integer, how can it know if it was "3" "2345", "32" "345" or other?
2) Are you compiling in Debug or in Release? In Release most of the variables are optimized in registers, there is even a good article here on CP about debugging in Release. Please check.
3) You didn't tell us WHICH variable you see filled with "\0" so I assumed the problem is in the second scanf_s because it is the one with the obvious [possible] flaw.
Hope that helps
Denis
ADDENDUM:
You may be using Unicode charset or wide characters. In that case the first byte of opera will be always 00H because the ASCII set is mapped in Unicode leaving the first byte to 0. Try disallowing Unicode adding
#undef _UNICODE
#undef UNICODE
at the beginning of the source file.