Here’s my code : MuJdnB - Online C Compiler & Debugging Tool - Ideone.com
t is the number of test cases. I am just counting the number of spaces in the string and printing the final answer as number of spaces + 1 . The problem is that it’s taking only 3 inputs instead of 4. It outputs 1 for the first test case without getting a string. Please help me find the error in my code. Thanks.