In this assignment, you are required to answer the short questions, identify error in the code,
give output of the code and develop three C# Console Programs to demonstrate your ability to
use C# input/output via command line, C# primitive and built-in C# types, C# operators and
expression, C# conditional statements, C# loop construct, and show your ability to validate the
inputs to avoid run-time errors.
Q1) What is managed and unmanaged code?
(2 Marks)
Q2) Give examples of reserved keyword, literals and data types in C#.
(2 Marks)
Q3) What is the difference between “continue” and “break” statements in C#? Explain it with
example.
(3 Marks)
Q4) What will be the output / error of given program?
static void Main(String[] args)
{
const int m = 100;
int n = 10;
const int k = n / 5 * 100 * n;
Console.WriteLine(m * k);
Console.ReadLine();
Sample Solution