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
zimovet [89]
3 years ago
15

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

r 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:
kvv77 [185]3 years ago
5 0

Answer:

The best head_ptr in the linked list is the node. A device connected to a network is called the node.

For example, if there is a network of five computers and two printers, there are eight nodes. Each has a network address and uniquely identifies.

Explanation:

Suppose there is a link list of function struct like this

void f ( struct node * head)

There is a pointer and can change the structure. But cannot change the variable head points. So consider the following code

struct node

{

int f1

struct node* next:

}

If the head has pointed at the head of the link list, then it can use the struct node*.

You might be interested in
Write a method that accepts a String object as an argument and returns a copy of the string with the first character of each sen
emmainna [20.7K]

Answer:

The programming language is not stated; However, the program written in C++ is as follows: (See Attachment)

#include<iostream>

using namespace std;

string capt(string result)

{

result[0] = toupper(result[0]);

for(int i =0;i<result.length();i++){

 if(result[i]=='.' || result[i]=='?' ||result[i]=='!')  {

 if(result[i+1]==' ') {

  result[i+2] = toupper(result[i+2]);

 }

 if(result[i+2]==' ')  {

  result[i+3] = toupper(result[i+3]);

 }

 } }

return result;

}

int main(){

string sentence;

getline(cin,sentence);

cout<<capt(sentence);

return 0;

}

Explanation:

<em>The method to capitalize first letters of string starts here</em>

string capt(string result){

<em>This line capitalizes the first letter of the sentence</em>

result[0] = toupper(result[0]);

<em>This iteration iterates through each letter of the input sentence</em>

for(int i =0;i<result.length();i++){

This checks if the current character is a period (.), a question mark (?) or an exclamation mark (!)

if(result[i]=='.' || result[i]=='?' ||result[i]=='!')  {

 if(result[i+1]==' '){  ->This condition checks if the sentence is single spaced

  result[i+2] = toupper(result[i+2]);

-> If both conditions are satisfied, a sentence is detected and the first letter is capitalized

 }

 if(result[i+2]==' '){ ->This condition checks if the sentence is double spaced

  result[i+3] = toupper(result[i+3]);

-> If both conditions are satisfied, a sentence is detected and the first letter is capitalized

 }

}

}  <em>The iteration ends here</em>

return result;  ->The new string is returned here.

}

The main method starts here

int main(){

This declares a string variable named sentence

string sentence;

This gets the user input

getline(cin,sentence);

This passes the input string to the method defined above

cout<<capt(sentence);

return 0;

}

Download cpp
7 0
4 years ago
Which key on a laptop keyboard is often used to help pair a mobile device with another device for communication purposes?
Nonamiya [84]

Bluetooth on a laptop is often used to help pair a mobile device with another device for communication purposes.

  • Bluetooth

<u>Explanation:</u>

A Bluetooth gadget works by utilizing radio waves rather than wires or links to associate with your mobile phone, cell phone or PC. Bluetooth is a remote innovation standard utilized for trading information among fixed and cell phones over short separations utilizing short-wavelength UHF radio waves in the modern, logical and restorative radio groups, from 2.400 to 2.485 GHz, and building individual zone systems. For instance, on Windows, either right-click the Bluetooth symbol in the notice zone or go to the Control Panel to discover the Hardware and Sound > Devices and Printers page. At the point when the gadget shows up in the rundown of Bluetooth and different gadgets, select it to associate (pair) it to the workstation.

7 0
4 years ago
Types of network model​
dexar [7]

Answer:

OSI Model and TCP/IP Model

Explanation:

4 0
3 years ago
Which of the following activities are performed by computer programmers? Choose all that apply.
AleksAgata [21]

Answer:

- They write step by step instructions for a computer to follow.

- They create a logic problem that the computer program can solve.

3 0
3 years ago
What are important acronyms we use when we talk about the internet? this is for computer science.
vovangra [49]

Answer:

Lol

Brb

Btw

Gtg

Explanation:

I hope this helps

7 0
3 years ago
Other questions:
  • The google android mobile operating system is a proprietary system, for use on only approved devices.​
    10·1 answer
  • 7. Write a program in C to display the string "ARRAY" in the following format : A AR ARR ARRA ARRAY
    5·1 answer
  • The ________ occurs when the user presses the enter key without typing a value for an input operation.
    5·1 answer
  • When do on loop conditions happen? (1 point)
    5·1 answer
  • Are Most job applications are online
    9·1 answer
  • 9. A change in the appearance of a value or label in a cell
    5·1 answer
  • An objective function in linearprogramming is a(n):
    11·1 answer
  • What is the one common feature that ties together different social media technologies
    11·1 answer
  • How do i delete peoples comments
    14·2 answers
  • Consumers affect which goods and services are produced because they _____.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!