_CRT_SECURE_NO_WARNINGS #define #include <stdio.h> #include <stdlib.h> void MAIN1 () { int NUM; the printf ( "Times:"); Scanf ( "% D", & NUM); char STR [40]; sprintf (STR, "for / L %% I in (1,1,% D) do Calc Start", NUM); System (STR); // System ( "PAUSE"); } void main () { the printf ( " % \ n-"); // Output: null the printf (" %% \ n-"); // Output:% use the string" %% ", as long as the character '%' the printf (" %% I \ n-') ; // Output:% I the printf ( "====== \ n-"); char STR [40]; // definition of a character array, each of which is a character sprintf (str, "%% i" ); // array which is in accordance with a character out of a, when the first print% is empty, the second one is also empty%, a third i, since not initialized, the default is 0 // This is the bug display, system call does not affect the execution of printf (str); getchar (); }