Computer Science, asked by Anonymous, 8 months ago

What is the process to create increment and decrement statement in C? Explain With example.


❌ Spammers stay away❌​

Answers

Answered by Kaushikkalesh
19

For a number : i

First Declare the Variable and assign a value to it

Increment Statement : i++ or ++i or i += 1

Decrement Statement : i-- or --i or i -= 1

Example:

#include<stdio.h>

void main() {

int i = 0;

i++;

i--;

}

Please Thank Me

And Mark this as Brainliest

Answered by abhinavthakur09
4

Answer:

Step 1 : In above program, value of “i” is incremented from 0 to 1 using pre-increment operator. Step 2 : This incremented value “1” is compared with 5 in while expression. Step 3 : Then, this incremented value “1” is assigned to the variable “i”.

Similar questions