C# program to produce a third array by appending two different arrays
All Answers
total answers (1)
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
total answers (1)
Program:
The source code to produce a third array by appending two different arrays in C# is given below. The given program is compiled and executed successfully on Microsoft Visual Studio.
Output:
Explanation:
In the above program, we created three arrays intArray1, intArray2, and intArray3. The intArray1 and intArray2 contain 5 items and we occupied space of 10 items for intArray3.
In the above code, we copied intArray1 to intArray3 and then appended intArray2 into intArray3 using BlockCopy() method.
The above code will print all elements of intArray3 on the console screen.