Convert a String to Integer Array in C/C++
Given a string str containing numbers separated with ", ". The task is to convert it into an integer array and find the sum of that array. Examples: Input : str = "2, 6, 3, 14" Output : arr[] = {2, 6, 3, 14} Sum of the array is = 2 + 6 + 3 + 14 = 25 Input : str = "125, 4, 24, 5543, 111" Output : arr