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

Suppose that f is a function with a prototype like this: void f(________ head_ptr); // Precondition: head_ptr is a head pointer

for a linked list. // Postcondition: The function f has done some computation with // the linked list, but the list itself is unchanged. What is the best data type for head_ptr in this function?
Computers and Technology
1 answer:
AlekseyPX3 years ago
4 0

Answer:

node*

Explanation:

The argument 'head_ptr' is the head-pointer for the following linked list so the data type of the following argument 'head_ptr' is 'node*' in the method 'f()' because the following method 'f()' computed the linked list, but perhaps the list itself remains unaffected.

A linked list is the DS type in which that component would be a different entity. Such component of the following list is called as a node that consists of two elements

You might be interested in
In the ADT graph the methid addVertex has efficiency
sweet-ann [11.9K]

Answer:

In ADT graph the efficiency of addVertex has efficiency O(logn).

Explanation:

The time complexity of the method addvertex in ADT graph is O(logn). addVertex method has time complexity of O(logn) because it has to divide the list in half and add the vertex according to the place where the needs to be added.

hence we conclude that the answer is O(logn).

6 0
3 years ago
Write a code segment that takes an emailaddress stored in the string email and stores theuser name in the string user and the ho
iragen [17]

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

  string email,username,host;//strings to store email,username,hostname..

  cout<<"Enter the email address "<<endl;

  cin>>email;//taking input of email address..

  bool flag=1;

  for(int i=0;i<email.length();i++)//iterating over the string email..

  {

      if(email[i]=='@')//if @ symbol is encountered make flag 0 skip this iteration.

      {

          flag=0;

          continue;

      }

      if(flag==1)//add to username if flag is 1.

      {

          username+=email[i];

      }

      else//add tom host..

      host+=email[i];

  }

  cout<<"The username is "<<username<<endl<<"The host name is "<<host;//printing the username and hostname..

return 0;

}

Explanation:

I have taken  three strings to store the email address entered by user ,username and host to store username and host name respectively.Then I am iterating over the string email if @ is encountered then skip that iteration before that keep adding characters to username string and after that keep adding characters to host.

8 0
3 years ago
If a database was being used to track sales, a customer who buys a lot of items would be a good example of how two tables could
3241004551 [841]

Answer:True

Explanation:

7 0
3 years ago
(Game Design) Creating and manipulating data structures is one of the primary functions of a development environment.
Galina-37 [17]

true i believe im not for sure

7 0
3 years ago
Read 2 more answers
How can one become a world scientist?
Lynna [10]
No need to woory abt age !!! In today's competitive grant world, this phenomenon is exacerbated. It is dangerous to one's funding to go against the trend, and if there is a lab to support and mouths to feed, the disincentives are great. This phenomenon stifles creativity, perhaps far more than biological age does. 
<span>While it is not frequently acknowledged either in the popular press or in scientific literature, a significant fraction of scientific discovery is the result of serendipity (or to put it more bluntly, luck). From the discovery of penicillin by Fleming to the discovery of new ionization techniques such as MALDI that power modern mass-spectrometry based proteomic research, luck has frequently played a big role. Such discoveries are generally attributed to hard work and genius, rather than to luck. Doing so gives the “genius” too much credit and luck too little.
</span><span>Risk taking is where most of the big discoveries in science lie. so takerisks.
</span>enjoy  always specially when you r  working and learn to say no
Learning to say “no” is particularly important for young faculty, who find themselves barraged with such requests, and who can easily get sucked into full-time committee duties. It is wise to step back frequently and ask, “overall, is this work I am doing fun?” If the answer is no, perhaps it is time to revisit and consider diving into a new area.
<span>Note the distinction in this guideline from: “learn to write and present well.”
</span><span>Understanding and conveying the big picture for one's work is perhaps the greatest challenge facing young scientists
</span>That's all I can give.
8 0
3 years ago
Read 2 more answers
Other questions:
  • You just read an msds for acetic acid. based on what you read, what type of information is included in an msds sheet? record you
    7·1 answer
  • Create a public non-final class named Streamer. You should implement one class method: filterStrings. It should accept a single
    8·1 answer
  • For homework, we have to figure out what's in the picture. It's " too close to tell " but I can't figure out what it is. Any ide
    11·1 answer
  • Assuming that the user enters 45 and 62 as inputs for n1 and n2, respectively, what is the output of the following code snippet?
    15·1 answer
  • Select the correct answer.
    6·1 answer
  • Do you need internet to play xbox one
    14·1 answer
  • When developing e-business systems, an in-house solution usually requires a ____ for a company that must adapt quickly in a dyna
    11·1 answer
  • Please help me
    10·1 answer
  • Create a static method that: - is called appendPosSum - returns an ArrayList - takes one parameter: an ArrayList of Integers Thi
    6·1 answer
  • Can someone follow my tt its c1ndy.dont.miss
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!