Arrays-Target Sum Triplets

Take as input N, the size of array. Take N more inputs and store that in an array. Take as input “target”, a number. Write a function which prints all triplets of numbers which sum to target.

Input Format
First line contains input N.
Next line contains N space separated integers denoting the elements of the array.
The third line contains a single integer T denoting the target element.

please see my code and tell me why its giving error and please make possible changes in that

hello @dhruvk3k please wait i will go through your code and let you know what is the error .