adplus-dvertising

Welcome to the Data Types,Variables and Operators MCQs Page

Dive deep into the fascinating world of Data Types,Variables and Operators with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Data Types,Variables and Operators, a crucial aspect of C# programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Data Types,Variables and Operators, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C# programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Data Types,Variables and Operators. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C# programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Data Types,Variables and Operators. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Data Types,Variables and Operators MCQs | Page 4 of 14

Discuss
Answer: (d).The | operator can be used to put ON a bit.
Q32.
Which of the following is NOT an Assignment operator in C#.NET?
Discuss
Answer: (a).\=
Q33.
What will be the output of the C#.NET code snippet given below?

int i, j = 1, k;
for (i = 0; i < 5; i++)
{
    k = j++ + ++j;
    Console.Write(k + " ");
}
Discuss
Answer: (b).4 8 12 16 20
Q34.
What will be the output of the C#.NET code snippet given below?

int a = 10, b = 20, c = 30; 
int res = a < b ? a < c ? c : a : b; 
Console.WriteLine(res);
Discuss
Answer: (c).30
Q35.
Which of the following statements are correct about the following code snippet?

int a = 10;
int b = 20;
bool c;
c = !(a > b);

1. There is no error in the code snippet.
2. An error will be reported since ! can work only with an int.
3. A value 1 will be assigned to c.
4. A value True will be assigned to c.
5. A value False will be assigned to c.
Discuss
Answer: (d).1, 4
Discuss
Answer: (c).The ^ operator can be used to Invert a bit.
Q37.
Which of the following statements are correct?

1. The conditional operator (?:) returns one of two values depending on the value of a Boolean expression.
2. The as operator in C#.NET is used to perform conversions between compatible reference types.
3. The &* operator is also used to declare pointer types and to dereference pointers.
4. The -> operator combines pointer dereferencing and member access.
5. In addition to being used to specify the order of operations in an expression, brackets [ ] are used to specify casts or type conversions.
Discuss
Answer: (a).1, 2, 4
Q38.
How many Bytes are stored by ‘Long’ Datatype in C# .net?

a.

8

b.

4

c.

2

d.

1

Discuss
Answer: (a).8
Q39.
Choose “.NET class” name from which datatype “UInt” is derived ?
Discuss
Answer: (b).System.UInt32
Q40.
Correct Declaration of Values to variables ‘a’ and ‘b’?
Discuss
Answer: (c).int a = 32; int b = 40;
Page 4 of 14

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!