Else you can paste your code as a answer so that other users can also take a chance to find error case
thanxx man.
thank you for trying! @sai_rathan
Can anyone provide a test case for which the code does not work?
I Dare you if you can tell where it will fail.
if(arr[0][i]=='*' && arr[1][i]=='.' && arr[0][i+1]=='.' && arr[1][i+1]=='*'){
ans--;
i++;
}
else if(arr[0][i]=='.' && arr[1][i]=='*' && arr[0][i+1]=='*' && arr[1][i+1]=='.'){
ans--;
i++;
}
I think in the if condition your trying to access a[0][i+1] but when you are accessing last element it will try to access its next element which is not present. I think this is causing some trouble for larger value of ‘n’ though I’m not sure.
The test cases already found where you were wrong so no point in dare XD.
On a side note- Request nicely and people will help 
Your code gives a compilation error because you have used scanf function for taking test case input without including stdio.h .
Correct me if I’m wrong.
There is an error in your logic for case 1.
Now consider a test case
5
.*.*.
*.*.*
Answer according to your logic will be 4 but correct answer is 3
@sai_rathan my program i also giving output as 3. As the 1st and 2nd column have vertical adjacent snakes so this is my case 2.
i hope you guys can understand this
i cant upload image due to lack of karma and on pasting the code it appears like this
but there is no compilation error just tell where the logic went wrong
thanks
Share your submission link
Fixed the format.
Users are requested to provide a submission link instead of pasting the entire code.
Your code doesn’t work for the test case below:
Input:
.**
**.
Your code’s output: 2
Expected Output : 3