R

Ram Sharma • 193.86K Points
Coach

Q. Which of the following is the correct ways to set a value 3.14 in a variable pi such that it cannot be modified?

  • (A) float pi = 3.14F;
  • (B) #define pi 3.14F;
  • (C) const float pi = 3.14F;
  • (D) const float pi; pi = 3.14F;
  • Correct Answer - Option(C)
  • Views: 192
  • Filed under category C#

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.

Related MCQs on C#

Q. Constructors are used to

Q. Which of the following statements are correct? 1. We can assign values of any type to variables of type object. 2. When a variable of a value type is converted to object, it is said to be unboxed. 3. When a variable of type object is converted to a value type, it is said to be boxed. 4. Boolean variable cannot have a value of null. 5. When a value type is boxed, an entirely new object must be allocated and constructed.

Q. Minimum and Maximum range of values supported by ‘float’ data type are?

Q. What will be the output of the following C# code?

Q. In C#, by default, the default interface methods are ___.

Q. C# has _______ operator, useful for making two way decisions.

Q. What will be the output of the following C# code conversion?

Q. Which of the following are valid .NET CLR JIT performance counters? 1. Total memory used for JIT compilation 2. Average memory used for JIT compilation 3. Number of methods that failed to compile with the standard JIT 4. Percentage of processor time spent performing JIT compilation 5. Percentage of memory currently dedicated for JIT compilation

Q. Which of the following statements are correct about JIT? 1. JIT compiler compiles instructions into machine code at run time. 2. The code compiler by the JIT compiler runs under CLR. 3. The instructions compiled by JIT compilers are written in native code. 4. The instructions compiled by JIT compilers are written in Intermediate Language (IL) code.

Q. Which C# keyword is used to coming out from the loop?

Learn All C# MCQs


Question analytics