Answer:
1 void parseEmailAddress(string email, string& username, string& domain)
2 {
3 int found = email.find("@")
4 if (found > 0)
5 {
6 username = email.substr(0, found);
7 domain = email.substr(found+1, -1);
8 }
9 return;
10}
Explanation line by line:
- We define our function.
- We use an open curly bracket to tell the program that we are starting to write the function down.
- We apply the find method to the email variable that was passed by the main program. The find method tells us where is the "@" located within the email.
- We use an if statement to ensure that the value that we found is positive (The value is negative if an only if "@" is not in the email address).
- We use an open curly bracket to tell the program that we are starting to write inside the if statement.
- We apply the substr method to the email to take the username; it receives a start and an end value, this allows us to take from the beginning of the email (position 0) until the "@".
- We apply the substr method to the email to take the domain; it receives the position of the "@" character plus one to take the first letter after the "@" and a minus-one representing the last character on the email.
- We use a closing curly bracket to tell the program that the if statement has finished.
- We return nothing because we are using reference parameters, which means that the memory positions of username and domain are going to be filled by our parseEmailAddress function and the main function can access those values directly.
- We use a closing curly bracket to tell the program that the function has finished.
Answer: B)Kernel threads
Explanation: Kernel thread is defined as the kernel mode task.It usually has a slow processing for the creation and management. This thread comes under the scheduler so, the task done by the thread is scheduled by the system and then processes it.
Other given option are incorrect because Processes and Light weight process are the task performed by the system for processing and User level threads are the threads that are handled by the programmer.Thus the correct option is option(B).
Answer:
Explanation:
Photoshop format (PSD) is the default file format and the only format, besides the Large Document Format (PSB), that supports all Photoshop features.
Click Tools, Internet options. ...The Internet Options window will open. ...Click Apply, OK to close the window.Click the wrench icon in the top-right corner of the browser.Select Options.In the 'On startup' section, select Open the home page.options window will open. Go to the Startup section and select When Firefox starts: Show my home page.. In the Home Page field, type in the website address you want to use as your home page.Click OK.