Commit 9eb72f15 by matjul

Delete lab5task3.c

parent b769682c
Showing with 0 additions and 36 deletions
#include <string.h>
#include <stdio.h>
int main(){
char list[9][50] = {
{"someguy@rusty.edu"},
{"milfHunter@gmail.com"},
{"smarmy@yahoo.com"},
{"h8sgmail.com@yahoo.com"},
{"smokinRocks@gmail.com"},
{"whodoesthis?@hotmail.com"},
{"smallPerson@hotmail.com"},
{"WhereIntheW0rld@WIW.com"},
{"mom_has_a_computer@aol.com"}
};
char c = '@';
char* listOfGmails[9];
int i;
int number;
for(i = 0; i < 9; i++){
listOfGmails[i] = strchr(list[i], c);
if(listOfGmails[i]){
listOfGmails[i][0] = '\0';
printf("%s\n", list[i]);
number++;
}
}
printf("%d", number);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment