Question
static void Main(string[] args)
{
int num1 = 20000;
int num2 = 50000;
long total;
total = num1 + num2;
Console.WriteLine("Total is : " +total);
Console.ReadLine();
}
a.
Compiler will generate runtime error
b.
Conversion is implicit type, no error generation
c.
Specifying datatype for conversion externally will solve the problem
d.
None of the mentioned
Posted under C# programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. For the given set of code select the relevant solution for conversion of data type.
Similar Questions
Discover Related MCQs
Q. Subset of ‘int’ datatype is :
View solution
Q. Type of Conversion in which compiler is unable to convert the datatype implicitly is ?
View solution
Q. Disadvantages of Explicit Conversion are ?
View solution
Q. Correct order of priorities are :
View solution
Q. The correct way of incrementing the operators are :
View solution
Q. Which of the following is/are not Relational operators in C#.NET ?
View solution
Q. Select the relevant output for the set of code :
m = 5;
int y;
1. y = m++;
2. y = ++m;
View solution
Q. Which of the following options is not a Bitwise Operator in C#?
View solution
Q. Which among the following is a conditional operator ?
View solution
Q. Arrange the operators in the increasing order as defined in C#:
!=, ?:, &, ++, &&
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C# programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!