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
Nookie1986 [14]
3 years ago
11

Concatenating arrays Strings have build-in functions to perform concatenation. Write a function called append () that performs c

oncatenation for two char arrays (you will have to pass in a third char array that will hold the result). You will also need to pass in the lengths of each char array. You may not use strings for this part. Sample main code: char first[ ] = {'?', ' ', 'a', 'm', ' '}; char second[ ] = {'i', 'r', 'o', 'n', 'm', 'a', 'n', '\0'} char result[200]; append(first, 5, second, 8, result); cout << result; Example output for code above:
Computers and Technology
1 answer:
olganol [36]3 years ago
4 0

Answer:

Check the explanation

Explanation:

#include<iostream.h>

#include<stdlib.h>

void append(char* first,int n,char* second, int n1,char* result)

{

  int i,j=0;

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

      result[i]=first[i];

  for(i=n;i<n1+n;i++)

  {

      result[i]=second[j];

      j++;

  }

}

void main()

{

  char first[]={'I', ' ','a', 'm', ' '};

  char second[]={'i', 'r', 'o', 'n', 'm', 'a', 'n','\0'};

  char result[200];

  append(first,5,second, 8, result);

  cout<<result;

  cout<<endl;

  system("pause");

}

You might be interested in
How does Wireshark differ from NetWitness Investigator?
nikdorinn [45]

Answer is given below

Explanation:

  • Wireshark differ from NetWitness Investigator because
  • Windshark shows a detailed view of individual packets.
  • WireShark captures live traffic and displays the results at the packet level.
  • Netwitness shows a high-level view and can be compared to the new packet capture
  • NetWitiness Investigator provides a comprehensive overview of previously tracked traffic that can be used to view anomalies, compliance and attacks.
8 0
3 years ago
How do you embed a scriplet in an HTML document ​
harina [27]

Answer:

Explanation:

hello

you put the scriptlet between the following tags <% ... %> in HTML document

hope this helps

7 0
4 years ago
A client-server relationship is the basic form of a ____?
adell [148]
<span>
A client-server relationship is the basic form of a computer network. 

-hope this helps.</span>
4 0
3 years ago
Which lines of the code, marked by Q, are legally declared based on the scope of the variable?​
WINSTONCH [101]

inside a function or a block which is called local variables

4 0
2 years ago
Which word pairs are both principles of HCT?
Dimas [21]

Answer:

network engineering and game programming

8 0
3 years ago
Other questions:
  • Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to pu
    15·1 answer
  • The partners of a small architectural firm are constantly busy with evolving client requirements. To meet the needs of their cli
    11·1 answer
  • What is the most common password on the internet?
    11·2 answers
  • The presentation ____ determines the formatting characteristics of fonts and colors.
    8·1 answer
  • Jin needs to add a row into his spreadsheet, but he does not want to remove any existing data. Which combination of options shou
    6·2 answers
  • (Java) In the ChiliToGo program in Exercise 12, the costs to produce an adult meal and a child’s meal are $4.35 and $3.10, respe
    8·1 answer
  • 15. Cinematic tutorials and action-movie camera shots mixed with gameplay and some of the features that have made _____ stand th
    11·1 answer
  • 1. How many bits would you need to address a 2M × 32 memory if:
    8·1 answer
  • Which search phrase is the most effective to find out about the most popular pizza chains worldwide in 2019?
    14·1 answer
  • What is a Database, Flat file and Relational Database?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!