A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

Write A C++ Program To Merge Two Array In Third Array Unconditionally
Q:

Write A C++ Program To Merge Two Array In Third Array Unconditionally

0

A C++Program To Merge Two Array In Third Array Unconditionally

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <iostream>
#include<string.h>
#include<cstdlib>
using namespace std;
main ()
{
int s1,s2,a[100],b[100],i;
cout<<"Enter the size of Array 1\n\n";
cin>>s1;
cout<<"Enter the first Element of array\n\n";
for(i=0;i<s1;i++)
{
 cin>>a[i];
}

cout<<"Enter the size of Array 2\n\n";
cin>>s2;
cout<<"Enter the Second Element of array\n\n";
for(i=s1;i<s2+s1;i++)
{
 cin>>a[i];
}

cout<<"Merge array Are Given Below\n\n";
for(i=0;i<s1+s2;i++)
{
 cout<<a[i]<<" ";
}

}

 

Output:

Enter the size of Array 1

5

Enter the first Element of array

10

20

30

40

50

Enter the size of Array 2

4

Enter the Second Element of array

14

25

36

63

Merge array Are Given Below

10 20 30 40 50 14 25 36 63 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now