C# Questions & Answers – String Formatting Operations – 2

This set of C# Interview Questions and Answers focuses on “String Formatting Operations – 2”. 1. Which of these methods of class String is used to extract a substring from a String object? a) substring() b) Substring() c) SubString() d) None of the mentioned 2. What will be the output of the following C# code … Read more

advertisement

C# Questions & Answers – String Formatting Operations- 1

This section of our 1000+ C# MCQs focuses on string formatting operations in C# Programming Language. 1. What will be the output of the following C# code snippet? static void Main(string[] args) { string s1 = "olleH"; string s2 = "olleh"; if (s1 == s2) Console.WriteLine("Equal"); else Console.WriteLine("Unequal"); if (s1.Equals(s2)) Console.WriteLine("Equal"); else Console.WriteLine("Unequal"); Console.ReadLine(); } … Read more

advertisement

C# Multiple Choice Questions – String Formatting

This section of our 1000+ C# MCQs focuses on basics of string formatting in C# Programming Language. 1. What are strings in C#? a) a sequence of characters b) array of characters c) objects of built-in data type d) a reference type 2. Select the namespace in which string class is built? a) System.Text b) … Read more

advertisement

C# Questions & Answers – Accessor controls of class

This set of C# Assessment Questions and Answers focuses on “Accessor controls of class”. 1. Which among these access specifiers should be used for main() method? a) private b) public c) protected d) none of the mentioned 2. Which of these is used as default for a member of a class if no access specifier … Read more

advertisement

C# Question & Answers – Pointers Operation – 2

This set of C# Questions and Answers for Freshers focuses on “Pointers Operation – 2”. 1. What will be the output of the following C# code snippet? class UnsafeCode{ struct MyStruct { public int a; public int b; public int Sum() { return a * b; } } unsafe static void Main() { MyStruct o … Read more

advertisement

C# Questions & Answers – Pointers Operation – 1

This section of our 1000+ C# MCQs focuses on operation on pointers in C# Programming Language. 1. What will be the output of the following C# code snippet? class UnsafeCode { unsafe static void Main() { int m = 10; int *mptr = &m; int **ptr = &mptr; int n = 20; int *nptr = … Read more

advertisement

C# Questions & Answers – Unsafe code & Pointers Basics

This set of C# Problems focuses on “Unsafe code & Pointers Basics”. 1. Pointer variable is used to hold the _________ of the variable. a) Value b) Address c) Value and Address d) Name of the variable 2. Which among the given operators is referred to as ‘address of’ operator? a) * b) ^ c) … Read more

advertisement

C# Questions & Answers – Type Interface

This section of our 1000+ C# MCQs focuses on type interface in C# Programming Language. 1. Why are generics used? a) Generics make code more fast b) Generics make code more optimised and readable c) Generics add stability to your code by making more of your bugs detectable at compile time d) Generics add stability … Read more

advertisement

C# Questions & Answers – Network Errors Handling

This section of our 1000+ C# MCQs focuses on networking errors in C# Programming Language. 1. What exception is thrown if the URI format is invalid? a) URLNotFound b) URLSourceNotFound c) MalformedURLException d) UriFormatException 2. What exception is thrown if the protocol supported by URI prefix is invalid? a) URLNotFound b) URLSourceNotFound c) UriFormatException d) … Read more

advertisement

C# Questions & Answers – UrI Class

This section of our 1000+ C# MCQs focuses on Url class in C# Programming Language. 1. What does URL stand for? a) Uniform Resource Locator b) Uniform Resource Latch c) Universal Resource Locator d) Universal Resource Latch 2. Which of these exceptions is thrown by the URL class’s constructors? a) URLNotFound b) URLSourceNotFound c) MalformedURLException … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.