Google | Phone Screen | SWE L3
Anonymous User
1031

Replace string variable with it's value for printf function.
String would contain only "%d" and the values following that will be only integers. Lets say for simplicity input will be a string and array of integers, which can be parsed from the printf statement.
Ex. printf("hi %d.", 1)
should result in: hi 1.

Follow up:
What happens for multiple type; i.e., if the string contains "%d" and "%f".
printf("hi %d %f.", 1,2.9)

Comments (3)