for Loop in C# Programming

For Loop is a loop in programming languages like C# that repeats a block of statements until a condition provided is satisfied. Unlike other less structured loops like while and do..while, this loop contains initialization, condition and increment/decrement before the loop statement.

do while Loop in C# programming

Do While Loop is just like any other loop in C#, but in this loop we have condition at the end of the loop. So this guarantees the execution of statements inside the loop at least once and the loop will be repeated if the condition is satisfied until the condition is false. The condition can be changed in the loop statements. We can also exit the loop using break statement.

While Loop in C# programming

While Loop is a loop in programming languages like C# that repeats a block of statements until a given condition is true. The condition comes after while and it can be any expression that return boolean value. The expression inside the while loop is executed only if the condition is satisfied. The condition can be changed inside the loop. The loop exits when the condition is false.

C Program to Calculate Power of a Number

The power of a number can be defined as how many times the number is multiplied with itself. For example: 93= 9 X 9 X 9 = 729 25= 2 X 2 X 2 X 2 X 2 = 32 This can be written in the form xn. So, in this program we ask the user to input the value of x and n.

Switch Case Statement in C# Programming

switch case is a conditional statement where a switch statement compares a variable with a number of provided values called cases and executes a block of statements for each case.

if Statements in C# programming

if Statement if statement is conditional or decision making statement. It uses boolean variable or a condition which gives a boolean result and a statement or block of statements which will be executed only if the condition is satisfied or boolean result is true.

Operator Precedence and Associativity in C# Programming

Operator Precedence is ordering of operators according of its priority. Each operator have different priority level. For example, in a expression a = b + c / d; , operator ‘/’ has the highest precedence and operator ‘=’ has the lowest precedence. So, ‘/’ will be operated first, ‘+’ will be operated after that and lastly ‘=’ will be operated.

Operators in C# Programming

Operators are symbols that performs certain task in an expression. Operators in C# are special symbols like + / == . ++ etc. These operators can be used to process data. There operators are categorized below: