Computer Science, asked by pranavagraekar, 6 months ago

Write a function that takes 2 inputs - A string and an integer flag (Value can be 0 or 1) • If the flag value is 'O' the function should return all the characters at even place in the input string • If the flag value is 'l'the function should return all the characters at odd place in the input string Example Output: • Function 1("TRACXN",0) = "RCN" • Function 1("TRACXN", 1) = "TAX"​
can anyone code this in python??

Answers

Answered by Anonymous
9

Answer:

For my scanf I get "format '%s' expects arguments of type char but argument has 'char * (*)[41]". I'm not sure what this means but I assume it's because of the array initialization.

On the while loop it gives me the warning that says comparison between pointer and integer. I'm not sure what that means either and I thought it was legal in C to make that comparison.

Similar questions