C/ Sample Test,Sample questions

adplus-dvertising

Question:
 Minimum and Maximum range of values supported by ‘float’ data type are ?

1.1.5 * 10 ^-40 to 3.4 * 10 ^38

2.1.5 * 10 ^-40 to 3.4 * 10 ^38

3.1.5 * 10 ^-45 to 3.4 * 10 ^38

4.1.5 * 10 ^-45 to 3.4 * 10 ^37

Posted Date:-2022-01-05 07:37:11


Question:
 Which is the String method used to compare two strings with each other ?

1.Compare To()

2.Compare()

3.Copy()

4.ConCat()

Posted Date:-2022-01-05 07:35:46


Question:
 Which of the following can implement an interface?
1.Data
2.Class
3.Enum
4.Structure
5.Namespace

1. 1, 3

2.2, 4

3. 3, 5

4.4 only

Posted Date:-2022-01-05 09:00:22


Question:
 Which of the following statements is correct?

1. When a class inherits an interface it inherits member definitions as well as its implementations.

2.An interface cannot contain the signature of an indexer.

3.Interfaces members are automatically public.

4.To implement an interface member, the corresponding member in the class must be public as well as static.

Posted Date:-2022-01-05 08:57:19


Question:
A variable which is declared inside a method is called a________variable

1.Serial

2.Local

3.Private

4.Static

Posted Date:-2022-01-05 07:34:31


Question:
Scope of variable is related to definition of variable as:
1. Region of code within which variable value is valid and hence can be accessed.
2. No, relation with region where variable is declared its value is valid in entire scope.

1.a

2.b

3.a, b

4.None of the mentioned

Posted Date:-2022-01-05 07:45:23


Question:
Select output of the given set of Code :
static void Main(string[] args)
{
String name = "r4r";
Console.WriteLine("Good Morning" + name);
}

1.r4r

2.Good Morning

3.Good Morning r4r

4.Good Morning name

Posted Date:-2022-01-05 08:31:34


Question:
Type of Conversion in which compiler is unable to convert the datatype implicitly is ?

1. ushort to long

2.int to uint

3.ushort to long

4.byte to decimal

Posted Date:-2022-01-05 08:19:47


Question:
What will be output of the following conversion ?
static void Main(string[] args)
{
char a = 'A';
string b = "a";
Console.WriteLine(Convert.ToInt32(a));
Console.WriteLine(Convert.ToInt32(Convert.Tochar(b)));
Console.ReadLine();
}

1.1, 97

2. 65, 97

3. 65, 97

4.97, 1

Posted Date:-2022-01-05 07:43:42


Question:
Which datatype should be more preferred for storing a simple number like 35 to improve execution speed of a program?

1.sbyte

2.short

3.int

4.long

Posted Date:-2022-01-05 07:38:09


Question:
Which of the following are value types?
1.Integer
2.Array
3.Single
4.String
5.Long

1.1, 2, 5

2.1, 3, 5

3.2, 4

4.3, 5

Posted Date:-2022-01-05 08:38:07


Question:
Which of the following is NOT an Integer?

1.Char

2.Byte

3.Integer

4.Short

Posted Date:-2022-01-05 08:33:08


More MCQS

  1. C# MCQS -Programming (.NET Framework)
  2. C# MCQS -Programming(Control Instructions)
  3. C# MCQS - Functions and Subroutines(.NET Framework)
  4. C# Programming-Constructors
  5. C# Programming- Arrays
  6. C# Programming -Structures
  7. C# Programming-Properties
  8. C# Programming -Exception Handling
  9. C# Programming -Interfaces
  10. C# Programming -Delegates
  11. C# Programming -Generics
  12. C# Programming - Datatypes
  13. C# Programming- Operators
  14. C# Programming -Classes and Objects
  15. NET Programming mcqs
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!