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
Sveta_85 [38]
3 years ago
6

)Dynamically allocate an object of Banana, using the pointer variable daco.

Computers and Technology
1 answer:
zepelin [54]3 years ago
5 0

Answer:

d) daco = new Banana;

Explanation:

Dynamically allocated variables have their memory allocated in the heap memory.We declare a dynamical variable like this:-

int *a=new int ;

It means a pointer a is created on the stack memory which hold the address of the block that hold the value of variable a in heap memory.

We already have the pointer daco. We just have to initialize with keyword new.

It will be like daco=new Banana; which matches the option d.

You might be interested in
To find all the prime numbers less than or equal to a given integer n by Eratosthenes' method: 1. Create a list of consecutive i
natta225 [31]

Answer:

I am writing a Python program:

def Eratosthenes(n):  

   primeNo = [True for i in range(n+1)]  # this is a boolean array

   p = 2  # the first prime number is initialized as 2

   while (p * p <= n):     # enumerates all multiples of p

       if (primeNo[p] == True):                

           for i in range(p * p, n+1, p):  #update multiples

               primeNo[i] = False

       p = p + 1        

   for p in range(2, n):   #display all the prime numbers

       if primeNo[p]:  

           print(p),    

def main():     #to take value of n from user and display prime numbers #less than or equal to n by calling Eratosthenes method

   n= int(input("Enter an integer n: "))

   print("The prime numbers less than or equal to",n, "are: ")  

   Eratosthenes(n)      

main()      

Explanation:

The program contains a Boolean type array primeNo that is initialized by True which means that any value i in prime array will be true if i is a prime otherwise it will be false. The while loop keeps enumerating all multiples of p starting from 2, and striking them off from the original array list and for loops keep updating the multiples. This process will continue till the p is greater than n.  The last for loop displays all the prime numbers less than or equal to n which is input by user. main() function prompts user to enter the value of integer n and then calls Eratosthenes() function to print all the prime numbers less than or equal to a given integer n.

   

7 0
3 years ago
What command do you use to increase or decrease the view of a selected cell or range of cells to fill the excel window area for
kap26 [50]

Zoom to selection is the command that should be used to increase or decrease the view of a selected cell or range of cells to fill the excel window area for better visibility

I hope this will help you.

7 0
3 years ago
which data representation system is based on the digits 0-9 and is mostly easily interpreted In real wrold situations​
alekssr [168]

Answer:

Hexadecimal  data representation system is based on the digits 0-9 and is mostly easily interpreted In real word situations​ .

Explanation:

Hexadecimal manages sixteen different figures: most often the numbers 0–9 to describe values zero to nine, and (A–F) to describe values ten to fifteen. The modern hexadecimal system was first launched into the domain of computing by IBM in 1963. An older description, with 0-9 and u-z, was practiced in 1956 by the Bendix G-15 computer.

3 0
3 years ago
What is life all about?
zloy xaker [14]
Life can be about anything........
8 0
3 years ago
Read 2 more answers
Explain each kind of pointer and for what it is appropriate.
Mademuasel [1]

Pointer: A pointer is a variable which holds the address of other variable of the specified data type(like int,float,char). In programming we basically use pointers to store the other variable's address.

3 0
3 years ago
Read 2 more answers
Other questions:
  • The function below takes a single string parameter: sentence. Complete the function to return a list of strings indicating which
    5·1 answer
  • A video game character prefers to take enemies on from a distance. What skills might such a character have?
    11·2 answers
  • Andy uses a dial-up modem to connect to the Internet. He usually browses news sites, but he notices that online video takes a lo
    6·2 answers
  • 1) What is Net beans
    6·1 answer
  • The process of bringing data or a file from one program to another is called
    13·2 answers
  • Which of the following is a software application program?
    12·1 answer
  • A method that movie distributors are adopting to make it possible to view movies instantly, without DVD, is known as:
    11·1 answer
  • HELP WILL GIVE BRAINLIEST
    5·1 answer
  • Test if the word mold is stored in the variable word. Computer science.
    9·1 answer
  • True/False: Functions are ideal for use in menu-drive programs. When a user selects a menu item, the program can call an appropr
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!