Question
HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol includes a status code returned by
HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. Some of the codes and their meanings are listed below: C++
200, OK (fulfilled)
403, forbidden
404, not found
500, server error
Given an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
I'm getting an error on this.
This is my code:
cout << "Enter a status";
cin >> status;
switch (status)
{
case 200:
break;
case 403:
break; case 404:
break;
case 500:
break; }
I keep getting the value of _stdout is incorrect.
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