Write a C program to merge two arrays into a third array and print the merged array.
First line contains n1. Second line contains n1 elements. Third line contains n2. Fourth line contains n2 elements.
Print the merged array of size n1 + n2 separated by spaces.
1 <= n1, n2 <= 50
3 1 2 3 2 4 5
1 2 3 4 5
Copy all elements of the first array into the result array, then append all elements of the second array.
#include <stdio.h>
int main() {
int n1, n2;
if (scanf("%d", &n1) == 1) {
int arr1[50];
for (int i = 0; i < n1; i++) {
scanf("%d", &arr1[i]);
}
scanf("%d", &n2);
int arr2[50];
for (int i = 0; i < n2; i++) {
scanf("%d", &arr2[i]);
}
// Write your code here to merge and print
}
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used