C# Questions & Answers on Fundamental of Networking for Freshers

1. Which namespace is mostly preferred for the operation of networking in C#?

a) System.Web
b) System.in
c) System.Net.Mail
d) All of the mentioned
Answer: c

Explanation: Networking support is contained in several namespaces defined by the .NET Framework.The primary namespace for networking is System.Net. It defines a large number of high-level, easy-to-use classes that support various types of operations common to the Internet.Several namespaces nested under System.Net are also provided. Example :System.Net.Mail.
2. Which of the following are the classes defined by the namespace System.Net:

a) Cookie
b) CookieContainer
c) FileWebRequest
d) All of the mentioned
Answer: d
3. Which of the following are the interfaces defined by the namespace System.Net:

a) IAuthenticationModule
b) HttpWebRequest
c) WebProxy
d) HttpResponseHeader
Answer: a
Explanation: c and d are namespaces and enumerations.
4. Which of the following are the classes that support the standard HTTP protocol

a) HttpWebRequest
b) HttpResponseHeader
c) HttpRequestHeader
d) HttpStatusCode
Answer: a

Explanation: The derived classes that support the standard HTTP protocol are HttpWebRequest and HttpWebResponse.
5. Which of the following class/classes supports the task of uploading and downloading the file:

a) WebRequest
b) WebResponse
c) WebClient
d) All of the mentioned
Answer: c

Explanation: If we only need to upload or download a file, then WebClient is often the best way to accomplish it.
6. How many ports of TCP/IP are reserved for specific protocols?

a) 10
b) 1024
c) 2048
d) 512
Answer: b
7. How many bits are present in a single IP address?

a) 8
b) 16
c) 32
d) 64
Answer: c
8. Which of the following is the full form of DNS?

a) Data Network Service
b) Data Name Service
c) Domain Network Service
d) Domian Name Service
Answer: d
9. Which of the following classes is used to encapsulate IP address and DNS?

a) DatagramPacket
b) URL
c) InetAddress
d) ContentHandler
Answer: c

Explanation: InetAddress class encapsulates both IP address and DNS. We can interact with this class by using the name of an IP host.
10. Which of the following are the protocols defined by .NET runtime:

a) HTTP
b) HTTPS
c) File
d) All of the mentioned
Answer: d

Explanation: The .NET runtime defines HTTP, HTTPS, file, and FTP protocols. Thus, if we specify a URI that uses HTTP prefix, we will automatically receive the HTTP-compatible class that supports it. If we specify a URI that uses FTP prefix, we will automatically receive the FTP-compatible class that supports it.

Related

Linux Bash Shell Questions and Answers on Command History and Job Control for Freshers

1. fc stands for a) find commandb) fix commandc) both find & fix commandd) none of the mentioned Answer: c Explanation:’fc -l’ is used to list history of commands and ‘fc -e’ to edit them and...

C# Questions & Answers on Introduction of Reflections for Freshers

1. Which feature enables to obtain information about the use and capabilities of types at runtime? a) Runtime type IDb) Reflectionc) Attributesd) None of the mentioned Answer: b Explanation: Refl...

Linux Bash Shell Questions & Answers on Arithmetic Expressions for Freshers

1. Which built-in command performs integer arithmetic in bash shell? a) letb) getc) setd) none of the mentioned Answer: a 2. Which expression use the value of the enclosed arithmetic expression? ...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item