Answer:
include iPods, PlayStations, Xbox, TiVo, and WRT54G.
Explanation:
Answer:
#include <bits/stdc++.h>
using namespace std;
int main() {
string email,username,host;//strings to store email,username,hostname..
cout<<"Enter the email address "<<endl;
cin>>email;//taking input of email address..
bool flag=1;
for(int i=0;i<email.length();i++)//iterating over the string email..
{
if(email[i]=='@')//if @ symbol is encountered make flag 0 skip this iteration.
{
flag=0;
continue;
}
if(flag==1)//add to username if flag is 1.
{
username+=email[i];
}
else//add tom host..
host+=email[i];
}
cout<<"The username is "<<username<<endl<<"The host name is "<<host;//printing the username and hostname..
return 0;
}
Explanation:
I have taken three strings to store the email address entered by user ,username and host to store username and host name respectively.Then I am iterating over the string email if @ is encountered then skip that iteration before that keep adding characters to username string and after that keep adding characters to host.
Answer:
The code will display the following on the screen:-
2
0
2
Explanation:
The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.
Is it asking for a web site like .edu? or something like that?