Learn Visual C#
- Getting Started
- Variables and Data Types
- C# Operators
- Conditional Constructs
- Loop Constructs
- C# Statements
- Classes and Methods
- Constructors and Deconstructors
- Encapsulation and Abstraction
C# Operators – Programming Exercises
√Programming Question of C# Operators
Qu. 1: Write a program for arithmetic operator in which ask 2 values from user and stores in different variable and then show output as adding, subtracting, multiplying and dividing.
Qu. 2: Write a Program for relational operator in which ask 2 values from user and stores in different variable. Compare them and show the output to user.
Qu. 3: Write a program in which ask user for following details:
1. Check whether user is Male and 18 or 18+. If returns true then show welcome message
2. Check whether user is Male and below 18. If returns true show message teenager now allowed.
3. Check whether user is Female and any age show message "No Access".
Qu. 4: Write a Program for bitwise operator and performs operation on this value.
Num1= 38 //Binary Value = 0010 0110
Num2= 87 //Binary Value = 0101 0111
In this lesson you have learned all about operators in C# with programming examples and exercises. Next lesson is Conditional Constructs in which you will learn about if else, switch case and more C# keywords.