cs_basic_compiler_error_task - brainchildservices/curriculum GitHub Wiki
SLIDE-1
Get to Know a compiler...
- A compiler is a program that transforms source code written in one programming language into another programming language.
- the C# code that you write must be converted into something that your computer's processor can understand. The processor is, of course, the brain of the computer - the part that performs all its calculations.
- The processor doesn't know C#; it only understands machine codes.
- When you run the C# compiler, it takes your code as an input, does some processing, and then outputs your program in intermediate language (IL) code which is saved in .exe or .dll files.
SLIDE-2
- Task-1
-
Figure out the error and solve problem to get the number as a text output.
using System; public class Program { public static void Main() { string numtext = 30 Console.WriteLine(numtext); } } output: 30
-
SLIDE-3
- Task-2
-
solve the error and get the number as number type output.
using System; public class Program { public static void Main() { int num = 12.34; Console.WriteLine(int num); } } output=12.34
-
SLIDE-4
-
Task-3
using System; public class Program { public static void Main() { int num = 53; console.writeLine(num); } } output:53
-
REF link :