1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fomenos
3 years ago
5

Write a CPP Program to read an integer number. Use a pointer to display this numbe

Computers and Technology
1 answer:
Alexxx [7]3 years ago
4 0

Answer:

#include <iostream>

using namespace std;

int main() {

   int n,*p;

   cin>>n;//taking input.

   *p=n;//passing the address of n to pointer.

   cout<<*p<<endl;//printing the number using the dereferncing operator.

return 0;

}

Explanation:

The above written program in in C++.This program takes input of the integer n and stores the address of the integer in the pointer p. For printing the value of the to which the pointer is pointing we need to used the dereferencing  operator * .

You might be interested in
Never mind I got it
sergiy2304 [10]
<span>She is estimating the future profits with an estimate of long-term sales and the actual cost incurred.</span>
5 0
3 years ago
Read 2 more answers
Who want to play quzzies the code is 124 3142
konstantin123 [22]

Answer:

22

Explanation:

11+11=22

7 0
3 years ago
Alex writes down a string with four digits. (Since this is a string, not a number, it can start with a $0.$ For example, Alex co
Artist 52 [7]

Answer: The answers to all parts of this question are based on "automatic string". The condition is also provided which states that the string the machine outputs is the same string (4-digit string) which is fed to the machine as input.

Explanation: (a) The string will not remain automatic string if it contains a digit greater or equal to $5$. As we know that machine should print the same string which is fed into it. In this case the machine will insert a 0 in place of $5$. So the number is inserting a 0 when it is output by the counting machine. For example if we input $2152$ machine will print "$0120$" which shows that the digits are not the same as fed to the machine. If we take string $0702,$ which is given in the question, we see that machine prints out "$2010$" which means that number is inserting a 0 so automatic string cannot contain a digit greater than $5$

(b) The same answer as given in (a). For example the if we write $4220$ machine prints out "$1020$".  So the automatic string cannot contain $4.$

(c) This is a bit tricky as machine count the digit $3$. Lets take an example string $3303$. the machine prints out "$1003$". It counts three BUT its not an automatic string because the string printed out is different from the string that was fed to the machine. So automatic string cannot contain $3.$

(d) Now we know that an automatic string cannot contain digits 3,4,5 and above. So it can contain digits 0,1 and 2 with 0 at the end as the automatic string cannot contain digit 3 or above.Lets take a few examples of strings with combinations of 0,1 and 2 to check if they are automatic strings.

  • $1220$ the machine prints $1120$ which is not the same as fed into machine so its not an automatic string.
  • $2020$ the machine prints out "$2020$". Its 2 times "$0$", 0 times "$1$",2 times "$2$" and 0 times "$3$" which is the same as fed to machine so $2020$ is an automatic string.
  • $1210$  is an automatic string as the machine prints out "$1210$" which is the same string fed to machine.
8 0
3 years ago
Importancia del sistema operativo
love history [14]

Answer:

Un sistema operativo es el software más importante de tu computador, ya que se encarga de gestionar el hardware, el acceso a la memoria, acceso a la CPU y controlar gran parte de las tareas que lleva a cabo tu computador.

7 0
3 years ago
You have four DCs in your domain. Active Directory appears to be corrupted on one of the DCs, and you suspect a failing hard dri
Softa [21]

Answer:C

Explanation:

5 0
3 years ago
Other questions:
  • In the relocatable dynamic partitions scheme, the Memory Manager relocates programs to gather together all of the empty blocks a
    9·1 answer
  • "a​ _______ network delivers user data in many different geographical locations and makes those data available in a way that min
    5·1 answer
  • An _____image is an image that appears on a web page
    8·1 answer
  • You have been asked to provide an account for an outside consultant, who needs limited access to the network for a very short pe
    10·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    15·2 answers
  • Assignment Guidelines
    12·1 answer
  • What are possible penalties if a designer is caught breaking copyright laws?
    13·1 answer
  • Select the correct answer.
    12·2 answers
  • This type of headline sits next to a story.<br> Banner<br> Slammer<br> Hammer<br> Sidesaddle
    8·2 answers
  • WILL CHOOSE BRAINLIEST! in cells D6 through D8, enter formulas to calculate the values of the stocks. The formulas should multip
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!