Question
Domain Filtering Each email address consists of two parts: the username (the part before the @) and the domain (the part after the @). Some
Domain Filtering
Each email address consists of two parts: the username (the part before the @) and the
domain (the part after the @). Some email clients allow their users to filter incoming
emails based on the domain of their origin addresses. For example, if an email is received
from test@example.com and a filter is set for example.com, the received email will
not be shown in the client.
You are to implement a rudimentary version of this feature. You will be given N email
addresses. You will need to count the number of emails that will be filtered out given a
string M, the email domain you will be filtering out.
Format Input
The first line contains a single integer N. The next N lines will contain a string Oi
, the
origin address of the i-th email. The final line will contain M, the email domain to be
filtered out.
Format Output
Output a single integer X, the number of emails that will be filtered out.
Constraints
1 N 1000
1 |Oi
| 100
Oi will only contain lowercase characters, underscore, dots, and one single @ character.
Sample Input (standard input)
4
jojo_jotaro@yagoo . com
lili_lee@beenoose . ac . id
bibi_the . bee@boogle . com
big_grass_field@yagoo . com
yagoo . com
Sample Output (standard output)
2
Note : Use C Language , Dont Use Stdlib as you can use string.h and stdio.h only
please make a new code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started