One way that a newspaper design may change in the future is that they will only be available in an interactive online edition. The correct answer is B. <span />
Answer:
The answer to the given question can be given as:
The value of *iptr is 7. and the value of iptr is dynamic.
Explanation:
In the c++ code, it is defined that x is an integer variable that assigns a value which is 7. Then we define a pointer variable that is *iptr. This variable holds an address of the x variable. When we print the value of the iptr variable. if we use the expression *iptr to print value of the pointer variable by cout that is used in c++ for pint values. so the value of the iptr is 7. If we use the expression iptr sent to cout so we show the address of the variable x. In the pointer, it manages the addresses of dynamically allocated so the address of the variable is changed on execution time.
Answer:
4 5 6
Explanation:
Since there is a do-while loop, you need to check the values for each iteration until the condition (Count <= X) is not satisfied.
First iteration -> Count = 1 and X = 3, Y = 1 + 3, Write Y -> 4
Second iteration -> Count = 2 and X = 3, Y = 2 + 3, Write Y -> 5
Third iteration -> Count = 3 and X = 3, Y = 3 + 3, Write Y -> 6
After the third iteration count is equal to 4 and X is equal to 3. That is why loop ends.
Answer:
import java.util.Scanner;
public class num10 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the numbers to add up. enter 999 to stop");
int num = in.nextInt();
int sum = 0;
while (num!=999){
sum = sum+num;
System.out.println("Enter the next number");
num = in.nextInt();
}
System.out.println("The sum is: "+sum);
}
}
Explanation:
The application is implemented in Java
A while loop is used to continously prompt user for inputs. The condition of the while loop is while (num!=999)
When the number 999 is entered, it displays the sum which is initialized to 0
Answer:
def main():
name = input("What is your name? ")
if not name == "" or "":
age = int(input("What is your age? "))
print("Hello " + name + "! You were born in " + str(2021 - age))
main()
Explanation:
Self explanatory