For this Question: Given a string S and a char X, your task is to print the number of times the character X occurred in the string S.The input contains the string S and the character X separated by a space.

Constraints:-
1 <= |S| <= 100000
'a' <= S[i] <= 'z'
'a' <= X <= 'z'Print the number of times the character X occurred in the string S.Sample Input:-
newtonschool o

Sample Output:-
3, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    
string s;
cin>>s;
char c;
cin>>c;
int cnt=0;
for(int i=0;i<s.length();i++){
    if(s[i]==c){
        cnt++;
    }
}
cout<<cnt;

    }
, In this Programming Language: C++, Now tell me if this Code is compilable or not?