You will read in two strings from a file cp4in_1. Txt at a time (there will be 2n strings, and you will read them until EOF) and then do the following. You alternately take characters from the two strings and string them together and create a new string which you will store in a new string variable. You may assume that each string is no more than 20 characters long (not including the null terminator), but can be far less. You must use pointers. You may store each string in an array, but are not allowed to treat the string as a character array in the sense that you may not have statements like c[i]

Answers

Answer 1

Use the knowledge in computational language in C++ to write the  a character array .

How to define an array in C++?

An Array is a set of values ​​arranged in lists and accessible through a positive numeric index. So, we have that each position of our Array is a variable of the type of our Array, so we have to have a way to initialize this set of variables.

So in an easier way we have that the code is:

#include <stdio.h>

#include <studlib.h>

int main()

{

File*fp;

fp=fopen("cp4in_1.txt","r");

char ch;

//while(1)

//{

while(!feof(fp))

{

char *s1,*s2,*s3;

s1 = (char*)malloc (20 *sizeof (char));

s2 = (char*)malloc (20 *sizeof (char));

s3 = (char*)malloc (20 *sizeof (char));

int i=0,j=0,x,y;

while(1)

{

ch=getc(fp);

if(ch=='\n')

break;

*(s1+i)=ch;

i++;

}

while(1)

{

ch=getc(fp);

if(ch=='\n')

break;

*(s2+j)=ch;

j++;

}

for(x=0;x<i;x++)

{

*(s3+x)=*(s1+x);

}

for(y=0;y<j;x++,y++)

{

*(s3+x)=*(s2+y);

}

for(x=0;x<i+j;x++)

{

printf("%c",*(s3+x));

}

printf("\n");

getc(fp);

}

}

See more about C++ code at brainly.com/question/19705654

You Will Read In Two Strings From A File Cp4in_1. Txt At A Time (there Will Be 2n Strings, And You Will

Related Questions

Using the drop-down menu, complete these sentences about forums and blogs.

Developer forums are not always open to the general public, but they do have

information for developers.

Developer blogs contain

on a variety of topics that are of interest to programmers.

Developer forums and blogs can provide

information for programmers.

Developer forums are useful, because they can provide

Answers

Answer:

Using the  drop-down menu, complete these sentences about forums and blogs.

Developer forums are not always open to the general public, but they do have

✔ useful

information for developers.

Developer blogs contain

✔ posts

on a variety of topics that are of interest to programmers.

Developer forums and blogs can provide

✔ important

✔ timely

information for programmers.

Developer forums are useful, because they can provide

✔ reliable information

.

Explanation:

Edge 2022

Factory-installed _____ wiring of listed equipment need not be inspected at the time of installation of the equipment, except to detect alterations or damage.

Answers

Factory-installed Internal 90.7 wiring of listed equipment need not be inspected at the time of installation of the equipment.

What does it implies for equipment to be listed?

Listed in this scenario are  known to be equipment or materials that have been placed in a list that is set too be published by a firm that is engaged in product evaluation.

Conclusively, This is known to be the adequate keeping of timely inspection of production of listed equipment or materials and Factory-installed Internal 90.7 wiring of listed equipment need not be inspected at the time of installation of the equipment.

Learn more about equipment from

https://brainly.com/question/25806993

_____ is a way to protect a system from hackers. Installing a troll on the server Installing a troll on the server Making "Deny" the default Making "Deny" the default Installing a botnet Installing a botnet Using packet sniffers

Answers

Answer:

Making "Deny" the default

Explanation:

A troll would not do anything security-wise. A botnet is what you are protecting from. Packet sniffers may alert you of odd traffic, but will not protect the system.

Answer:

Making "Deny" the default

Explanation:

_____ systems are a type of artificial intelligence that uses a database to provide assistance to users.

Answers

Expert system are a type of artificial intelligence that uses a database to provide assistance to users.

What is expert systems?

An expert system is known to be a form of computer program that often uses artificial-intelligence processes to handle issues that are found in a specific domain that ordinarily needs human skills.

Conclusively, this system is also regarded as a computer program that employs artificial intelligence (AI) technologies to bring about the the specific behavior of a human or a firm.

learn more about artificial intelligence from

https://brainly.com/question/25523571

About how many copies of a dna region will be produced after 30 cycles in the pcr machine?.

Answers

About I billion copies of a DNA region will be produced after 30 cycles in the PCR machine.

How many numbers of DNA are there after 30 cycles of PCR?

In 30 cycles, even if the cycle started with only a single strand of DNA, when it has been amplified, it is said to become more than a billion copies ( that is about 230 = 1.02 x 109).

Conclusively, note that in every new DNA piece about 1 million copies of a single fragment of DNA can be gotten from it.

Learn more about DNA from

https://brainly.com/question/16099437

Which type of internet connection allows for high-speed bi-directional data communication over a hybrid fiber-coaxial (HFC) connection

Answers

The type of internet connection that allows for high-speed bi-directional data communication over a hybrid fiber-coaxial (HFC) connection is A cable modem.

What is a cable modem?

A cable modem is known to be a type  of network bridge that assist in the area of bi-directional data communication through the use of radio frequency channels found or seen in any hybrid fiber-coaxial (HFC).

Note that the use of a modem is often in the area of connecting a said computer to any network through the use of a cable television line.

Learn more about  internet connection  from

https://brainly.com/question/529836

The protection of data provided to organizations or stored on personal computers is a high priority.
a. True
b. False

Answers

Answer:

true

Explanation:

pls brainliest me pls

Nearly all social software systems include a(n) ________, which helps control your information flow.

Answers

dashboard

Nearly all social software systems include a(n) dashboard, which helps control your information flow.


Which of the following data types can hold a fractional (decimal) number?

Answers

A float data type can hold a decimal number.

JAVA
Write a method that makes the input string of sentences ending with '.' and combines them into a single sentence. The result should keep the final period.

For example,
runOnSentence("A sentence. That runs on.")
returns
"A sentence that runs on."

Answers

When did you post this? Just wondering cuz I’m about to take a test tomorrow and need fast response times, not sure if this site is reliable for that.

the user reports intermittent Wireless connectivity on a new mobile phone other users do not report any issues using mobile devices connected to 3 access points in the office the protocol in use is WPA2 /AES what is most likely the cause

Answers

The most likely the cause is that the mobile or client system is moved too far away from the access point.

What is wireless connectivity?

A wireless network is known to be a form of  computer network where one uses  only Radio Frequency (RF) connections instead of the use of wires or antennae.

Note that the most likely the cause is that the mobile or client system is moved too far away from the access point and as such when the user is close to the Wireless connectivity, it will work very fine.

Learn more about Wireless connectivity from

https://brainly.com/question/25633298

In Bash, what commands can you use to view the contents of a document?

Answers

You can use the cat and less command to view the contents of a file.

hope this helps! :)

The ______is used to store data in tablets, smartphones, and digital cameras. The Secure Digital (SD) is the most common format currently in use, available in various speeds and storage capacities. Select your answer, then click Done.

Answers

Answer:

Memory card

Explanation:

The Memory card is used to store data in tablets, smartphones, and digital cameras. The Secure Digital (SD) is the most common format currently in use, available in various speeds and storage capacities.

Brief description of RAM?
brief description of how RAM has evolved?
What is the functionality of RAM?
What are the benefits of RAM to the computer system?

Answers

RAM (Random Access Memory) is the hardware in a computing device where the operating system (OS), application programs and data in current use are kept so they can be quickly reached by the device's processor

The first form of RAM came about in 1947 with the use of the Williams tube. It utilized a CRT (cathode ray tube); the data was stored on the face as electrically charged spots. The second widely used form of RAM was magnetic-core memory, invented in 1947

The computer memory RAM ( Random Access Memory ) is a store any types of data for a short time. It means RAM memory is used for short-term data. The main purpose of RAM in a computer is to read and write any data. RAM memory works with the computer's hard disk

RAM allows your computer to perform many of its everyday tasks, such as loading applications, browsing the internet, editing a spreadsheet, or experiencing the latest game. Memory also allows you to switch quickly among these tasks, remembering where you are in one task when you switch to another task

Answer:It makes the computer better your wlcome give me brilint

What specific type of Windows Servers are used to authenticate user accounts and contain most of the information that attackers want to access

Answers

Windows Servers are the platforms that are the operating system of networking and services. Domain Controllers are used to authenticating accounts.

What are Domain Controllers?

Domain Controller is a windows server that gives access to the user's accounts upon receiving a request by verifying the account and details. It acts as the gatekeeper to guard the accounts.

Domain Controller (DC) responds to the Windows Server domain's request to give access and in this way protects the account from unauthentic access and theft of information from unauthorized sources.

Therefore, Domain Controller a type of Windows Server is used to authentic account.

Learn more about windows servers here:

https://brainly.com/question/15687746

#SPJ1

Imagine a piece of graph paper situated behind an image and think about how all the
tiny squares sit in proximity to one another. Next, imagine an invisible force behind
the grid pushing and pulling the little squares so they appear blown up or minimized
--what concept does this represent?

A. Manipulation

B. Watermarking

C. Image cropping

D. Imagine distortion

Answers

The scenario where qn invisible force behind the grid pushes the little squares so they appear blown up or minimized is known as C. Image cropping.

What is image cropping?

It should be noted that image cropping simply means improving the framing and composition of an image.

It's the scenario where an invisible force behind the grid pushes the little squares so they appear blown up or minimize.

Learn more about image on:

https://brainly.com/question/26307469

Which statements describe the use of style in word

Answers

Answer:

can be used to make Word documents look the same

saves the user time when doing formatting tasks

allows for the definition of reusable formatting

can be applied to paragraphs and fonts

Which command should you use to display both listening and non-listening sockets on your Linux system

Answers

Answer:

#netstat -a

Explanation:

netstat is used for a lot of network related utilities, to see them all just type netstat -h

Drag each label to the correct location on the image.
Classify the examples based on knowledge representation.
salary information
different ways of reaching
a destination
students' marks in
different subjects
bank statement
shortest time or path
for network connection
different ways to cook
a meal in the given time
the options are which go under number or graph

Answers

Answer:

where is the image

Explanation:

An association indicates that the destination address is for a networking device connected to one of the hub ports. True or False

Answers

An association indicates that the destination address is for a networking device connected to one of the hub ports a true statement.

What is an association on a bridge?

An association is known to show  that the destination MAC address for a specific host is linked to one of the  given ports found on the bridge.

Note that when any form of an association is found, the data is said to be moved to port. and as such Association shows that the destination address is for a networking device connected to one of the ports that is found on the bridge.

Learn more about association from

https://brainly.com/question/13603772

When an element is added to a queue, it is added to the rear. When an element is removed from the queue, it is removed from the

Answers

It gets removed from the front

Name an important invention in the early years of personal computers{PCs}

Answers

One of the first and most famous of these, the Electronic Numerical Integrator Analyzer and Computer (ENIAC)

Jhon bought a new printer for his desktop computer. It does not work even though he checked all the cables and cords. What do you think he forgot to connect?
A. The installer
B. The ports and plug
C. The device driver
D. The utility software

Answers

It could be A let me explain why to print you need the installer to print something out so its A

An error message is displayed during Windows startup about a service that has failed to start, and then the system locks up. You try to boot into Save Mode, but get the same error message. What do you try next

Answers

What you should try next are:

Try and Boot to Windows RE and carry out a Startup Repair.Do click on the Last seen Good Configuration seen on the Advanced Boot Options menu.

What is Startup error?

When a system is said to be having issues in starting, it may be due to display error messages that is on its startup.

Note that these messages can come as a result of system BIOS or can be due to the Windows. Know that these error messages shown by the BIOS can be due to Boot failure or others.

Learn more about error message  from

https://brainly.com/question/25671653

Match the five traits to their descriptions. word choice Sentences flow naturally from one idea to the next. 슈 conventions The writing is structured in a way appropriate to the topic and purpose. voice Spelling, grammar, and other rules are followed sentence fluency Precise terms enliven the text. organization A sense of the writer's personality comes through. any help​

Answers

Answer:

organization goes to "the writing is structured..."

word choice goes to "precise terms..."

voice goes to "a sense of the writer's..."

sentence fluency goes to "sentences flow naturally..."

conventions goes to "spelling, grammar..."

Answer:

yw

Explanation:

FCAPS is a network management functional model. FCAPS is an acronym that represents the focal tasks necessary to effectively manage a network. Security management is:

Answers

Security management is known as an activities done so as to control access to network resources and hinder or lower access  more exclusively to only specific authorized users.

What is FCAPS?

FCAPS is a term that connote fault, configuration, accounting, performance and security.

This is known to be a a network management framework that was said to have been formed by the International Organization for Standardization (ISO). The aim of this network management model is to know more about the major duties of network management systems.

Learn more about  network management  from

https://brainly.com/question/5860806

Checkpoint 11.36 The method getValueFromFile is public and returns an int. It accepts no arguments. The method is capable of throwing an IOException and a FileNotFoundException. Write the header for this method.

Answers

Answer:

public int getValueFromFile() throws IOException, FileNotFoundException

Explanation:

Most operating systems include security features, such as an integrated ____, to protect against unauthorized access via the Internet.

Answers

Hello!

The answer would be: firewall.

I hope that this helps you!

The events that happen in a story are called the _________________.
A) setting
B) plot
C) diagram
D) prewriting

Answers

Plot like what he said

A rating determined by a search engine based on the number of links to a particular site and the qualities of those links is called _______.

Answers

The links are the url that divert the individual to the particular site. The rating based on the link to the particular search engine is termed as link popularity.

What is a link in computer?

The link or the hyperlink in the computer is given as the reference to the data used by the user for the access to the anchor text.

The development of the high rating to the link at the search engine delivers the popularity of the link.

Learn more about computer link, here:

https://brainly.com/question/14569984

#SPJ1

Other Questions
a trader buys 200 oranges for 60 kobo and sells them at 8 for 12 kobo.what is his gain Lola and her school had a fun run, she donated 300 dollars, and the rest of her classmates donated 230 dollars. How much would they earn altogether? (She has 17 classmates) Simplify this as much as you can Based on the information in paragraph 2, the reader can infer that the first pinball game was made:About ten years agoMore than a century agoA thousand years agoIn the year 1800 a wooden water wheel made of recycled materials SAM K TRAN/SCIENCE PHOTOLIBRARY / UIG / ImageQuest 2021The type of space used in this sculpture is an example of open closed spiral value 5. Which of the following is a function?A. (1,7), (2,14), (3, 21), (1, 28)B. (0, A), (5, B), (10, C), (15, D), (5, E)C. (-5,1),(-10,1),(-15, 1), (-20,1),(-15,1)D. (1, 1), (2, 2), (3, 3), (4,4), (5,5) What is the domain of the function h(x) = 4 log2 (x - 6) +1? Adolf Hitler and the Nazi Party gainedpower using many different strategies.Describe how Hitler and the Nazi Partyrose to power through violence andexploiting the hardships of Germany. Dear, ( Name of Iphone store)As soon as I bought my Iphone and got home, it didn't work. If I send it back, can you tell me what is wrong with it or get me a new one?Thanks! From ( Your Name ) Charles bought 11 bottles of juice for $22.33. What is the unit rate? An ethical code may not address specific issues becauseA. Technology is such a broad area that a code cannot cover it all. B. Technology evolves so quickly so the code may not be up to dateC. It tests the ethics of personnel and addresses general issuesD. Ethical codes have no legal authority to penalize offenders Katrina's ski boots cost 8% more thanher skis. Her ski boots cost $162. Whichequation can be used to find the cost, c,of Katrina's skis?I need pls!! Robbie factored the following expression incorrectly. Identify his mistake, then write a few sentencesexplaining to him how to fix it. The following excerpt is from researcher Erin Bryant's "Real Lies, White Lies and Gray Lies:Towards a Typology of Deception" (2008). Read the excerpt carefully. Then write an essay thatargues your position on the circumstances -if any-under which lying should be consideredacceptable.To group all lying into one category is misleading.Some lies... are trivial and may evenprevent someone from being hurt by an unnecessary truth. These harmless white lies havebeen called a communication competence or "social lubricant" because they allow people tocensor negative thoughts and truths.In your response you should do the following: Respond to the prompt with a claim that establishes a line of reasoning. Select and use evidence to develop and support your line of reasoning.Explain the relationship between the evidence and your thesis. Demonstrate an understanding of the rhetorical situation. Use appropriate grammar and punctuation in communicating your argument. X-On a piece of paper, graph y+4 Look again at this excerpt from Shakespeare's Julius Caesar. Which character archetype does Brutus most likelyrepresent?Brutus most likely represents a blankarchetype because his conversation with Cassius shows blank happened before Christopher Columbusended up in the Bahamas?HINTA. Christopher Columbus met the Taino people on the island ofHispaniola.B. Christopher Columbus read about gold in the famous explorerMarco Polo's journals.C. Europeans set out to find and colonize lands rumored to be ripewith riches.D. Gold and silver flooded into Europe and hurt the EuropeaneconomySUBMITWhich happened before Christopher Columbus ended up in the Bahamas? Triangle EFG has an area of 70 m. EF: FG= 1:2 and angle EFG = 40. (a) Calculate EF. Mr.pace has a new script pick-up opportunity for meteor in 500mg. What are some patient care central features that can be helpful to drive an impactful conversation?(select all that apply) Find the equation of the line shown