Logical Operators in C with Examples

This C Tutorial Explains Different Logical Operators in C with Examples. We know that if, while and for statements often use relational expressions as tests or test conditions. Sometimes we find it useful to combine two or more relational expressions. For example, suppose we want a program that counts how many times the characters other … Read more

advertisement

Relational Operators in C with Examples

This C Tutorial explains Relational Operators in C with Examples. While loops, for loops often rely on test expressions that make comparisons. Such expressions are termed relational expressions, and the operators that appear in them are called relational operators in C. Here is the complete list of relational operators in C. Less than Operator () … Read more

advertisement

Bitwise Operators in C with Examples

This C Tutorial Explains Bitwise Operators in C and How they Operate on their Operands. C Bitwise Operators: Bitwise operators in C are operators that are used to perform bit-level operations on data. The bitwise operator cannot be used with primitive data types such as float, double, and so on. Because of its compatibility, the … Read more

advertisement

Logical and Arithmetic Shifts in C with Examples

This C Tutorial Explains Logical and Arithmetic Shifts in C Language with Examples. A single Bit is the basic unit of Storage, stores either 1 or 0. Therefore as bits move left or right in a value of specific type viz. integer, char etc. their values change. Moving bits in a value in C Language … Read more

advertisement

Arithmetic Operators in C

This C Tutorial Explains Various Arithmetic Operators in C Language with examples. What are Arithmetic Operators in C? Arithmetic operators are used to perform simple mathematical operations on two operands. They are the most basic type of operator in the C language. These operators can be classified into two categories: unary and binary operators. When … Read more

advertisement

Assignment Operators in C with Examples

This C Tutorial Explains Different Assignment Operators in C with Examples. What is Assignment Operator in C? The basic assignment operator in C Programming Language is ‘=’, which we know as “equal to” in Mathematics. However, in C this is not to be confused with “equal to” but this performs different operation on its operands. … Read more

advertisement

Operator Precedence and Associativity in C

This C Tutorial Explains Operator Precedence and Associativity in C Programming. A meaningful Expression in C is a combination of Operators and Operands. An operator performs a fixed, predefined action on its two operands if it’s a Binary Operator or operates on its single operand if it’s a Unary Operator. Most of the operators in … Read more

advertisement

Operators in C Language

This C Tutorial Explains Operators & Various Types of Operators in C Language. What is Operator in C? An Operator is something that performs some fixed, predefined action on its operands. For example: 15 + 34; /* ‘+’ operator adds 34 to 15 */ x * y; /* ‘*’ multiplication operator here */ -x; /* … Read more

advertisement

Difference between Expression and Statement in C

Question: Differentiate between a C Expression and a C Statement. Answer: Every C program comprises of Statements. Program executes statement by statement. Each statement generally, in turn, comprises of some expression. And an expression may further comprise of sub-expressions. For example: /* diff_statements.c */ #include <stdio.h> #define SIZE 10 /* SIZE symbolic constant */   … Read more

advertisement

Expressions in C

This C Tutorial Explains C Expressions. What is Expression in C? Expression in C is a combination of operators and operands that specify an operation to perform. The value of the expression is the result of the operation. Example: 50; /* an integer constant */ 543.0009; /* a real constant */ x + y; /* … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.