

MCQOPTIONS
Saved Bookmarks
This section includes 623 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
251. |
Select the interfaces defined by the string class? |
A. | IComparable |
B. | IComparable<string> |
C. | ICloneable |
D. | All of the mentioned |
Answer» E. | |
252. |
Select the namespace in which string class is built? |
A. | System.Text |
B. | System.Net |
C. | System.IO |
D. | None of the mentioned |
Answer» B. System.Net | |
253. |
Accessibility modifiers defined in a class are? |
A. | public, private, protected |
B. | public, internal, protected internal. |
C. | public, private, internal, protected internal. |
D. | public, private, protected, internal, protected internal |
Answer» E. | |
254. |
Which of these access specifiers must be used for class so that it can be inherited by another subclass? |
A. | public |
B. | private |
C. | both public & private |
D. | none of the mentioned |
Answer» B. private | |
255. |
Which of these base class are accessible to the derived class members? |
A. | static |
B. | protected |
C. | private |
D. | shared |
Answer» C. private | |
256. |
Which among these access specifiers should be used for main() method? |
A. | private |
B. | public |
C. | protected |
D. | none of the mentioned |
Answer» C. protected | |
257. |
Which operator is commonly used to find the size of the type of C#? |
A. | size() |
B. | sizeof(type) |
C. | both size() & sizeof(type) |
D. | none of the mentioned |
Answer» C. both size() & sizeof(type) | |
258. |
What does the following code depicts? 1. System.Nullable count; 2. bool? done; |
A. | Code 1 declares the objects of nullable of type Nullable defined in the System namespace |
B. | Code 2 declares a nullable type in much shorter and in more commonly used way using ‘?’ |
C. | Both Code 1 declares the objects of nullable of type Nullable defined in the System namespace & Code 2 declares a nullable type in much shorter and in more commonly used way using ‘?’ |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
259. |
Choose the statement which defines the Nullable type Correctly: |
A. | A special version of a value type that is represented by a structure |
B. | A nullable type can also store the value null |
C. | Nullable types are objects of System.Nullable, where T must be a non nullable value type |
D. | All of the mentioned |
Answer» E. | |
260. |
What will be the declaration of the variable ptr as the pointer to array of 6 floats? |
A. | float *ptr[6]. |
B. | float [6]*ptr |
C. | float(*ptr)[6]. |
D. | float(*ptr)(6). |
Answer» D. float(*ptr)(6). | |
261. |
A structure pointer points to __________ |
A. | first member of structure |
B. | first two members of structure |
C. | whole structure |
D. | only to the last member of structure |
Answer» D. only to the last member of structure | |
262. |
Among the given pointers which of following cannot be incremented? |
A. | int |
B. | char |
C. | float |
D. | void |
Answer» E. | |
263. |
Which among the following is referred as an array of pointers? |
A. | int *p; |
B. | int (*)p; |
C. | int p[4]; |
D. | int*[4] p; |
Answer» E. | |
264. |
Which of the following job is done by the instruction ++*p for an integer pointer p? |
A. | increment value contained at address p |
B. | increment address contained in p |
C. | Both increment value contained at address p and increment address contained in p |
D. | neither increment value contained at address p nor increment address contained in p |
Answer» B. increment address contained in p | |
265. |
After incrementing a float pointer ptr by 1 it would be incremented by __________ |
A. | 1 byte |
B. | 2 bytes |
C. | 3 bytes |
D. | 4 bytes |
Answer» E. | |
266. |
What is the size of a char pointer? |
A. | 1 byte |
B. | 2 byte |
C. | 3 byte |
D. | 4 byte |
Answer» C. 3 byte | |
267. |
Choose the correct statement among the given statements? |
A. | Use of return statement is necessary in every function |
B. | Return statement may not be followed by a parenthesis |
C. | A program may contain more than one return statement |
D. | Return statement may not return a value |
Answer» B. Return statement may not be followed by a parenthesis | |
268. |
Which among the given operators is referred to as ‘address of’ operator? |
A. | * |
B. | ^ |
C. | & |
D. | ~ |
Answer» D. ~ | |
269. |
Fill up the blank : Pointer variable is used to hold the _________ of the variable |
A. | Value |
B. | Address |
C. | Value and Address |
D. | Name of the variable |
Answer» C. Value and Address | |
270. |
Select the type argument of open constructed type? |
A. | Gen<int> |
B. | Gen<T> |
C. | Gen<> |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
271. |
Which of these is an correct way of defining generic method? |
A. | name(T1, T2, …, Tn) { /* … */ } |
B. | public name { /* … */ } |
C. | class name[T1, T2, …, Tn] { /* … */ } |
D. | name{T1, T2, …, Tn} { /* … */ } |
Answer» C. class name[T1, T2, …, Tn] { /* … */ } | |
272. |
Which of these type parameters is used for generic methods to return and accept any type of object? |
A. | K |
B. | N |
C. | T |
D. | V |
Answer» D. V | |
273. |
Which of these classes is used to create servers that listen to either local or remote client programs? |
A. | httpServer |
B. | ServerSockets |
C. | MimeHeader |
D. | HttpResponse |
Answer» C. MimeHeader | |
274. |
Choose the exceptions generated by the GetResponseStream() method defined by WebRequest: |
A. | ProtocolViolationException |
B. | ObjectDisposedException |
C. | IOException |
D. | All of the mentioned |
Answer» E. | |
275. |
Which of these classes is used for operating on the request from the client to the server? |
A. | http |
B. | httpDecoder |
C. | httpConnection |
D. | httpd |
Answer» E. | |
276. |
Select the properties related to the network errors generated by WebException: |
A. | response |
B. | get |
C. | set |
D. | none of the mentioned |
Answer» B. get | |
277. |
Choose the exceptions generated by the GetReponse() method defined by WebRequest: |
A. | InvalidOperationException |
B. | ProtocolViolationException |
C. | WebException |
D. | All of the mentioned |
Answer» E. | |
278. |
Choose the exceptions generated by the Create() method defined by WebRequest: |
A. | NotSupportedException |
B. | UriFormatException |
C. | System.Security.SecurityException |
D. | All of the mentioned |
Answer» E. | |
279. |
What exception is thrown if the user does not have a proper authorization? |
A. | URLNotFound |
B. | URLSourceNotFound |
C. | URLSourceNotFound |
D. | All of the mentioned |
Answer» D. All of the mentioned | |
280. |
What exception is thrown if the protocol supported by URI prefix is invalid? |
A. | URLNotFound |
B. | URLSourceNotFound |
C. | UriFormatException |
D. | NotSupportedException |
Answer» E. | |
281. |
What exception is thrown if the URI format is invalid? |
A. | URLNotFound |
B. | URLSourceNotFound |
C. | MalformedURLException |
D. | UriFormatException |
Answer» E. | |
282. |
Which of these classes is used to access actual bits or content information of a URL? |
A. | URL |
B. | URLDecoder |
C. | URLConnection |
D. | All of the mentioned |
Answer» E. | |
283. |
Which of these data members of HttpResponse class is used to store the response from a http server? |
A. | status |
B. | address |
C. | statusResponse |
D. | statusCode |
Answer» E. | |
284. |
Which of these classes is used to encapsulate IP address and DNS? |
A. | DatagramPacket |
B. | URL |
C. | InetAddress |
D. | ContentHandler |
Answer» D. ContentHandler | |
285. |
Which of these exceptions is thrown by the URL class’s constructors? |
A. | URLNotFound |
B. | URLSourceNotFound |
C. | MalformedURLException |
D. | URLNotFoundException |
Answer» D. URLNotFoundException | |
286. |
What is the full form of URL in C#.Net? |
A. | Uniform Resource Locator |
B. | Uniform Resource Latch |
C. | Universal Resource Locator |
D. | Universal Resource Latch |
Answer» B. Uniform Resource Latch | |
287. |
Which of the following are the protocols defined by .NET runtime: |
A. | HTTP |
B. | HTTPS |
C. | File |
D. | All of the mentioned |
Answer» E. | |
288. |
Which of the following classes is used to encapsulate IP address and DNS? |
A. | DatagramPacket |
B. | URL |
C. | InetAddress |
D. | ContentHandler |
Answer» D. ContentHandler | |
289. |
Which of the following is the full form of DNS? |
A. | Data Network Service |
B. | Data Name Service |
C. | Domain Network Service |
D. | Domain Name Service |
Answer» E. | |
290. |
How many bits are present in a single IP address? |
A. | 8 |
B. | 16 |
C. | 32 |
D. | 64 |
Answer» D. 64 | |
291. |
How many ports of TCP/IP are reserved for specific protocols? |
A. | 10 |
B. | 1024 |
C. | 2048 |
D. | 512 |
Answer» C. 2048 | |
292. |
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» D. All of the mentioned | |
293. |
Which of the following are the classes that support the standard HTTP protocol |
A. | HttpWebRequest |
B. | HttpResponseHeader |
C. | HttpRequestHeader |
D. | HttpStatusCode |
Answer» B. HttpResponseHeader | |
294. |
Which of the following are the interfaces defined by the namespace System.Net: |
A. | IAuthenticationModule |
B. | HttpWebRequest |
C. | WebProxy |
D. | HttpResponseHeader |
Answer» B. HttpWebRequest | |
295. |
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» E. | |
296. |
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» D. All of the mentioned | |
297. |
Which of these methods is executed first before execution of any other thing that takes place in a program? |
A. | main method |
B. | finalize method |
C. | static method |
D. | private method |
Answer» D. private method | |
298. |
What is the process of defining more than one method in a class differentiated by parameters known as? |
A. | Function overriding |
B. | Function overloading |
C. | Function doubling |
D. | None of the mentioned |
Answer» C. Function doubling | |
299. |
Which of these data types can be used for a method having a return statement in it? |
A. | void |
B. | int |
C. | float |
D. | all of the mentioned |
Answer» E. | |
300. |
Which among the following is not a preprocessor directive? |
A. | #ifdef |
B. | #pragma |
C. | #Or |
D. | #undef |
Answer» D. #undef | |