1. Question: Which operator is used to check the overflow value in a variable?

    A
    checked

    B
    overflow

    C
    check

    D
    none

    Note: Not available
    1. Report
  2. Question: Which of the following string literal is valid for backslash?

    A
    string s1="\\\\server\\fileshare\\helloworld.cs";

    B
    string s1=@"\\server\fileshare\helloworld.cs"

    C
    string s1="\\server\fileshare\helloworld.cs"

    D
    string s1=@"\/\/server\/fileshare\/helloworld.cs"

    E
    None

    Note: Not available
    1. Report
  3. Question: Which of the following expression causes a compile-time error in C#?

    A
    short x=1, y=1; short z=(short) (x+y);

    B
    short z=1+2;

    C
    short x=1, y=1; short z=x+y;

    D
    short z=2000+4333;

    Note: The 8-bit and 16-bit integer types are byte, sbyte, short, and ushort. These types lack their own arithmetic operators, so C# implicitly converts them to larger types as required. In this case, x and y are implicitly converted to int.
    1. Report
  4. Question: Which of the following is not default value in C#.net?

    A
    null

    B
    0

    C
    '\0'

    D
    false

    E
    ""

    Note: Not available
    1. Report
  5. Question: Which of the following statement is not correct in term of double and decimal?

    A
    Double is useful for scientific computations

    B
    Decimal is useful for financial computations

    C
    Decimal is for man-made measurements.

    D
    Double is for real-world measurements.

    E
    none

    Note: Not available
    1. Report
  6. Question: Which are correct rectangular array declaration in C#?

    A
    in[,] matrix=new int[3,3];

    B
    var matrix=new int[,]{ {0,1,2}, {3,4,5}, {6,7,8} };

    C
    int [][] matrix=new int[3][];

    D
    int[,] matrix={ {0,1,2}, {3,4,5}, {6,7,8} };

    Note: Not available
    1. Report
  7. Question: Which are correct jagged array declaration in C#?

    A
    int[][] matrix=new int[3][];

    B
    int[][] matrix={ new int[]{0,1,2}, new int[]{3,4,5}, new int[]{6,7,8} };

    C
    int[,] matrix=new int[,]

    D
    var matrix=new int[][]{ new int[]{0,1,2}, new int[]{3,4,5}, new int[]{6,7,8} };

    Note: Not available
    1. Report
  8. Question: The this reference refers to the instance itself in C#.

    A
    True

    B
    False

    Note: Not available
    1. Report
  9. Question: Which of the following are correct ways to define CurrentPrice property in the class Stock in term of C#?

    A
    public class Stock{ decimal currentPrice; public decimal CurrentPrice{ get{return currentPrice;} set{currentPrice=value;} } }

    B
    public class Stock{ public decimal CurrentPrice{ set;get; } }

    C
    public class Stock{ ; public decimal CurrentPrice{ get(); set(); }

    D
    public class Stock{ decimal currentPrice; public decimal CurrentPrice{ return get; set=value; }

    Note: Not available
    1. Report
  10. Question: Which of the following code fragments are correct syntax for implementing an indexer?

    A
    class Sentence{ string[] words; public string this[int index]{ get{return words[index];} set{words[index]=value;} } }

    B
    class Sentence{ string[] words; public string this[int index,int index2]{ get{return words[index];} set{words[index]=value;} } }

    C
    class Sentence{ public string this[int index,int index2]{ get{return words[index];} set{words[index]=value;} } }

    D
    class Sentence{ string[] words; public string Index[int index]{ get{return words[index];} set{words[index]=value;} } }

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd