Question
class Program
{
static void Main(string[] args)
{
int ch;
HttpWebRequest req = (HttpWebRequest) WebRequest.Create("http://www.McGraw-Hill.com");
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
Stream istrm = resp.GetResponseStream();
for (int i = 1 ; ;i++)
{
ch = istrm.ReadByte();
if (ch == -1)
break;
Console.Write((char)ch);
if ((i % 400) == 0)
{
Console.Write("\nPress Enter.");
Console.ReadLine();
}
}
resp.Close();
}
}
a.
html
b.
text
c.
html/text
d.
text/html
Posted under C# programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What does the following code display while execution?
Similar Questions
Discover Related MCQs
Q. Which of these data members of HttpResponse class is used to store the response from a http server?
View solution
Q. Which of these classes is used to access actual bits or content information of a URL?
View solution
Q. What exception is thrown if the URI format is invalid?
View solution
Q. What exception is thrown if the protocol supported by URI prefix is invalid?
View solution
Q. What exception is thrown if the user does not have a proper authorization?
View solution
Q. Choose the exceptions generated by the Create() method defined by WebRequest:
View solution
Q. Choose the exceptions generated by the GetReponse() method defined by WebRequest:
View solution
Q. Select the properties related to the network errors generated by WebException:
View solution
Q. Which of these classes is used for operating on the request from the client to the server?
View solution
Q. Choose the exceptions generated by the GetResponseStream() method defined by WebRequest:
View solution
Q. Which of these classes is used to create servers that listen to either local or remote client programs?
View solution
Q. Which of these methods gives the full URL of an URL object?
View solution
Q. Why are generics used?
View solution
Q. Which of these is an correct way of defining generic method?
View solution
Q. Select the type argument of open constructed type?
View solution
Q. Pointer variable is used to hold the _________ of the variable.
View solution
Q. Which among the given operators is referred to as ‘address of’ operator?
View solution
Q. Choose the correct statement among the given statements?
View solution
Q. What is the size of a char pointer?
View solution
Q. After incrementing a float pointer ptr by 1 it would be incremented by __________
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C# programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!