String to Integer doubt

I’m not getting output, please help.

Hey @ayushtiwari12
Logic is correct
There is some issue in CB ide. Try in ur system or in other IDE

It is showing error in other IDE also,error: ‘strlen’ was not declared in this scope int len = strlen(a);

Include this header for strlen : #include
if the above doesnt work then add #include<bits/stdc++.h>