For The Given Set Of C Code Is Conversion Possiblep Pre #71
For the given set of C# code, is conversion possible?</p> <pre><code class="language-csharp" line="1"> static void Main(string[] args) { int a = 76; char b; b = (char)a; Console.WriteLine(b); Console.ReadLine(); } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Data Types, Variables and Operators - Type Conversion in Expressions - Quiz No.1.
For the given set of C# code, is conversion possible?
static void Main(string[] args) { int a = 76; char b; b = (char)a; Console.WriteLine(b); Console.ReadLine(); }
Compiler will generate runtime error
Conversion is explicit type
Compiler will urge for conversion from ‘integer’ to ‘character’ data type
None of the mentioned