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
Furkat [3]
1 year ago
5

Write a program to demonstrate doubly linked list using pointers – insert (beginning, end,

Computers and Technology
1 answer:
Mekhanik [1.2K]1 year ago
3 0

A program to demonstrate doubly linked list using pointers – insert (beginning, end, middle), delete(beginning, end, middle),view) is:

/* Initialize nodes */

struct node *head;

struct node *one = NULL;

struct node *two = NULL;

struct node *three = NULL;

/* Allocate memory */

one = malloc(sizeof(struct node));

two = malloc(sizeof(struct node));

three = malloc(sizeof(struct node));

/* Assign data values */

one->data = 1;

two->data = 2;

three->data = 3;

/* Connect nodes */

one->next = two;

one->prev = NULL;

two->next = three;

two->prev = one;

three->next = NULL;

three->prev = two;

/* Save address of first node in head */

head = one;

<h3>What is a Doubly Linked List?</h3>

This refers to the linked data structure that contains of a set of sequentially linked records called nodes.

The requested program is given above.

Read more about doubly linked list here:

brainly.com/question/13326183

#SPJ1

You might be interested in
In basic network scanning, ICMP Echo Requests (type 8) are sent to host computers from the attacker, who waits for which type of
Hoochie [10]

Answer:

d. ICMP Echo Reply (type 0)

Explanation:

ICMP or internet control message protocol is an Internet layer protocol in the TCP/IP suite. It works together with routing devices like the router to send messages based on results sensed in the network.

The RFC 1122 has stated that the ICMP server and end user application be configured or installed in user devices, for receiving and sending ICMP echo request packets and reply. The process is called pinging.

For an attacker to implement ping of ping, he needs to confirm if the target user in live by sending an ICMP echo request packet type 8, to receive an ICMP echo reply type0.

4 0
2 years ago
Find the root using bisection method with initials 1 and 2 for function 0.005(e^(2x))cos(x) in matlab and error 1e-10?
frutty [35]

Answer:

The root is:

c=1.5708

Explanation:

Use this script in Matlab:

-------------------------------------------------------------------------------------

function  [c, err, yc] = bisect (f, a, b, delta)

% f the function introduce as n anonymous function

%       - a y b are the initial and the final value respectively

%       - delta is the tolerance or error.

%           - c is the root

%       - yc = f(c)

%        - err is the stimated error for  c

ya = feval(f, a);

yb = feval(f, b);

if  ya*yb > 0, return, end

max1 = 1 + round((log(b-a) - log(delta)) / log(2));

for  k = 1:max1

c = (a + b) / 2;

yc = feval(f, c);

if  yc == 0

 a = c;

 b = c;

elseif  yb*yc > 0

 b = c;

 yb = yc;

else

 a = c;

 ya = yc;

end

if  b-a < delta, break, end

end

c = (a + b) / 2;

err = abs(b - a);

yc = feval(f, c);

-------------------------------------------------------------------------------------

Enter the function in matlab like this:

f= @(x) 0.005*(exp(2*x)*cos(x))

You should get this result:

f =

 function_handle with value:

   @(x)0.005*(exp(2*x)*cos(x))

Now run the code like this:

[c, err, yc] = bisect (f, 1, 2, 1e-10)

You should get this result:

c =

   1.5708

err =

  5.8208e-11

yc =

 -3.0708e-12

In addition, you can use the plot function to verify your results:

fplot(f,[1,2])

grid on

5 0
3 years ago
Good business ethics is a good marketing strategy. Discuss
Arada [10]
Good business ethics are the key to good marketing and success. Ethics portray whether an individual has good judgment, intelligence, and many more things that are essential to business. Without good ethics business as a whole would be ruthless. Some business ethics are even required by the law in some places and there are rules and regulation to trade. 

Hope that answered your question!
6 0
2 years ago
Explain the differences between copyright, fair use, and trademark?
ValentinkaMS [17]

A trademark is an easily recognizable symbol, phrase, or word that denotes a specific product. It legally differentiates a product or service from all others of its kind and recognizes the source company's ownership of the brand.

"Copyright" literally means the right to copy but has come to mean that body of exclusive rights granted by law to copyright owners for protection of their work. Copyright protection does not extend to any idea, procedure, process, system, title, principle, or discovery.

Fair use is a doctrine in United States law that permits limited use of copyrighted material without having to first acquire permission from the copyright holder.

7 0
2 years ago
Suppose you are asked to design a rotating disk where the number of bits per track is constant. You know that the number of bits
Olenka [21]

Answer:

suppose i was i would tell them i dont know and walk away

Explanation:

in thoery this is correct

you said suppose so i answerd

there is no use in reporting or getting this taken down

nether is it right

im not stealing points

Because in thoery its an answer

<em><u>THIS IS MY PROTEST</u></em>

6 0
3 years ago
Other questions:
  • Wordwrap forces you to stop typing words and press the enter key at the end of each line.
    12·1 answer
  • Xml is used to format the structure and style of a web page. true or false
    7·1 answer
  • Janelle is shopping for jeans from Express. She clicks on a style she likes. The site quickly presents her with a close-up view
    5·1 answer
  • Checking tire pressure should be performed:
    11·2 answers
  • on average, someone with a bachelor’s degree is estimated to earn _______ times more than someone with a high school diploma
    13·1 answer
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • How should tools be stored <br>​
    13·1 answer
  • What’s your fave tv show?
    14·2 answers
  • Describe two types of software suites supporting your answer with three examples each.
    12·1 answer
  • A(n) ___ is a set of CPUs which work in parallel in an attempt to simulate the way the human brain works, although in greatly si
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!