Archive

Category Archives for "C Programming"

Mastering the Switch Statement in C

The switch statement in c is useful to execute a particular task from among several tasks depending on the value of a variable or expression.. If the variable value equals value1 then statements1 will be executed. If the variable value equals value2 then statements2 will be executed, etc. If the variable value does not equal […]

Continue reading

If Else Statement in C

This statement is useful to execute a task depending on whether a condition is true or not. If the condition is true, then statement1 will be executed. If the condition is false, then the statement2 will be executed. The else part is written inside the square braces:[].This represents another part that is optional. In the […]

Continue reading

Mastering Operators in C: A Comprehensive Guide

Operators: The below table specifies list of Operators in C Operator Category Operator Symbols Arithmetic Operators +,-,*,/,% Assignment Operators =,+=,-=,*=,/=,%= Unary Operators -,++ and — Ternary Operators ?: Relational Operators <,<=,>,>=,= =,!= Logical Operators &&,| |, ! Bitwise Operators ~,&,|,^,<<,>> Miscellaneous Operators sizeof(),&,*, , Arithmetic Operators These operators are useful for performing basic arithmetic operations. […]

Continue reading