String_Interview_Questions
String_Interview_Questions
Description:
Given a string, count how many characters are digits (0-9) and how many are alphabetic letters (A-Z or a-z).
Ignore all other types of characters.
Sample Input:
Input: "Shubham123!@#45"
Expected Output:
Digits: 5
Alphabets: 7
#include <iostream>
using namespace std;
int main() {
string str = "Shubham123!@#45";
int digits = 0, letters = 0;
#include <iostream>
#include <cctype>
using namespace std;
int main() {
string str = "Shubham123!@#45";
int digits = 0, letters = 0;