C# Questions & Answers – Scope and Lifetime of Variables

This section of our 1000+ C# multiple choice questions focuses on scope and lifetime of variables in C# Programming Language. 1. Choose the correct type of variable scope for the following C# defined variables. class ABC { static int m; int n; void fun (int x , ref int y, out int z, int[] a) … Read more

advertisement

C# Questions & Answers – Initialization of Variables

This section of our 1000+ C# multiple choice questions focuses on Initialization of variables in C# Programming Language. 1. What will be the output of the following C# code? static void Main(string[] args) { int a = 5; int b = 10; int c; Console.WriteLine(c = ++ a + b ++); Console.WriteLine(b); Console.ReadLine(); } a) … Read more

advertisement

C# Questions & Answers – Char Types and String Literals

This section of our 1000+ C# multiple choice questions focuses on datatypes in character and strings in C# Programming Language. 1. What is the Size of ‘Char’ datatype? a) 8 bit b) 12 bit c) 16 bit d) 20 bit 2. What will be the output of the following C# code? static void Main(string[] args) … Read more

advertisement

C# Questions & Answers – Floating and Decimal Data Types

This section of our 1000+ C# multiple choice questions and answers focuses on Floating and Decimal Data Types in C# Programming Language. 1. Select a convenient declaration and initialization of a floating point number: a) float somevariable = 12.502D b) float somevariable = (Double) 12.502D c) float somevariable = (float) 12.502D d) float somevariable = … Read more

advertisement

C# Questions & Answers – Integer Data Types

This section of our 1000+ C# multiple choice questions focuses on various data types in integer in C# Programming Language. 1. How many Bytes are stored by ‘Long’ Data type in C# .net? a) 8 b) 4 c) 2 d) 1 2. Choose “.NET class” name from which data type “UInt” is derived? a) System.Int16 … 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.