11.
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();
}

12.
Select the correct differences between char and varchar data types?
i. varchar is non unicode and char is unicode character data type
ii. char is 'n' bytes whereas varchar is actual length in bytes of data entered in terms of storage size
iii. varchar is variable in length and char is the fixed length string
iv. For varchar, if a string is less than the maximum length then it is stored in verbatim without any extra characters while for char if a string is less than the set length it is padded with extra characters to equalize its length to given length

13.
Arrange the following data type in order of increasing magnitude sbyte, short, long, int.

14.
What will be the output of the following C# code?
public static void Main(string[] args)
{
    double ZERO = 0;
    Console.WriteLine("RESULT OF DIVISION BY ZERO IS :{0}",  (0 / ZERO));
    Console.ReadLine();
}

15.
Select appropriate difference between decimal, float and double data type in C#?
i. Float and Double are floating binary point types while decimal is a floating decimal point type.
ii. Precision difference for float is '7' digit for double is '15' to '16' digit and for decimal is '28' to '29' digits.
iii. Some values which cannot be exactly represented hence for those values float and double are more appropriate.

Read More Section(Basic Syntax and Data Types in C Sharp)

Each Section contains maximum 100 MCQs question on Basic Syntax and Data Types in C Sharp. To get more questions visit other sections.