Home > Back-end >  For bosses, help me to look at the three way choice to problem solving steps and the train of though
For bosses, help me to look at the three way choice to problem solving steps and the train of though

Time:09-16

CodePudding user response:

C: sure,
A. because wild pointer, the result is undefined.
B is also the reason of wild pointer, the result is undefined.
D is crossing the line, because s=p; After that, s pointer points to the first address, e * s=1; So 1 assignment is corresponding to data type int, and e is char types, only can say 1 byte, so the result is undefined, because * s=1; Crossing the line

CodePudding user response:

The first problem of the variable I type is not the same as the type of p,
The second question the answer is 6, pay attention to the two places, variables are global variables, b of a local variable in a mian function is a value for the incoming address, so be func function changed,

CodePudding user response:

The function of the second question, the answer B, func is on the passed parameter values, the main function of the add 2 at a time, so the answer is 6.
1, D, do not specify a [0] [0] value, so the result is pending, but unable to display the results in the vs2019,
  • Related