Answer to Question #261862 in C for Amraj

Question #261862

What is the process to create increment and decrement statement in C? Describe the difference between = and == symbols in C programming? Describe the header file and its usage in C programming?

1
Expert's answer
2021-11-08T17:37:28-0500

The increment and decrement operators in C are denoted by two symbols '+' for increment and '-' for decrement respectively.

These operators as all operators in C return a value and have two forms: prefix and postfix. These forms differ in the value the operator returns. The postfix operator (a++ for example) returns the original value of its operand and then changes its operand by 1 (increment in the example). The prefix operator (b++ for example) first changes its operand value and then returns this new value.


The '=' symbol denotes an assignment of a value to a variable in C. For example, after execution of the statement a = 2*2; the value of variable a will be equal to 4.

The double equal symbols '==' denote the comparison of two values. So the value of expression a == 2*2 will be 1 (which means 'true') if the value of the variable is equal to 4 and 0 (which means 'false') in other cases.


The header files in C contain declarations of predefined library functions, as far as type definitions and constant declaration which are needed to use these functions. For example, the header file <stdio.h> should be included in the program if it used any standard input/output function such as printf, scanf, etc.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS