Splunk interview question

Solve coding problems in C/C++