What function is best suited for extracting data from a formatted string into an array?
What function is best suited for extracting data from a formatted string into an array?
The correct function for extracting data from a formatted string into an array is 'sscanf'. 'fgetcsv' is used for reading and parsing CSV files into arrays. 'sprintf' is used for formatting and returning a string based on specified format. 'strtok' is used for splitting a string into tokens based on delimiters. 'sscanf' reads data from a string based on format specifiers, making it the best choice for this task.
Answer is B. sscanf
Agreed!