Which if any of the following C statements contain variables
Solution
a. scanf(\"%d%d\", &num1, &num2); //This statement reads two values from console, and will be stored in num1, and num2.
//So, the variables being replaced with new value are, num1, and num2.
b. p = j + k + 3 * 0; //This statement evaluates the expression on the right hand side, and will store the result in p.
//So, the variables being replaced with new value is p.
c. printf(\"%d\", &newvalue); //This prints the address of the variable newvalue. So, no variable will be modified/replaced.
d. scanf(\"%d\", newvalue); //If newvalue is declared as an integer pointer, will store the value read into newvalue.
//Otherwise will return an error.
e. printf(\"a = 7\"); //Prints the string to console, and no variable will be modified.
//Note that, \"a = 7\" is a string, and is not an assignment, and has no effect on variable a.
