Write a C program using recursion to solve the subset sum problem: determine if there exists a subset of array elements that adds up to a given target sum (print 1 if possible, 0 otherwise).
First line: n and target sum. Second line: n array elements.
Print 1 if subset sum exists, else 0.
1 <= n <= 15, target <= 1000
5 9 3 34 4 12 5
1
Recursively explore two choices for each element: either include the current element in the subset or exclude it.
#include <stdio.h>
int subsetSum(int arr[], int n, int target) {
// Write your recursive logic here
}
int main() {
int n, target;
if (scanf("%d %d", &n, &target) == 2) {
int arr[15];
for (int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
printf("%dn", subsetSum(arr, n, target));
}
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