answersLogoWhite

0

i++

i=i+1

++i

i+=1

but remember the answers of i++ and ++i are not be same..

use the following program to take closer look of the values of integer 'i'.

thanks,

Happy Garcha

UFV, Abbotsford, Canada

#include<stdio.h>

main()

{

int i;

printf(" i =>%d",i);

i++;

printf(" i++=> %d",i);

++i;

printf(" ++i => %d",i);

i=i+1;

printf(" i=i+1 =>%d",i);

i+=1;

printf(" i=+1 =>%d",i);

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you write an independent variable statement?

With your head, pen and paper or on your computer


Write a pseudocode statement that declares the variable cost so it can hold real numbers?

floating-point variable cost


Write Four different java statement that each add to integer variable x?

++x; x++; x += 1; x = x + 1;


Write a pseudocode statement that assigns the value 27 to the variable count?

count := 27


Write a pseudocode statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable totalfee?

set totalfee = subtotal * 0.15


What does an IVCDV chart mean?

Helps students organize identify independent variable, dependent variable, and constants in an experimental design. This information is then used to write an if/then statement for a hypothesis.


What is the purpose of an chart?

Helps students organize identify independent variable, dependent variable, and constants in an experimental design. This information is then used to write an if/then statement for a hypothesis.


How do you write xy in c program?

Assuming that x and y are two variables, such as they might be in Algebra, and that the expression "xy" is meant to be the multiplication of x times y, you would write it as x * y This expression could be used with a third variable in an assignment statement, or as a condition in an if statement where it can be compared to another variable or a constant.


What is another way to write plus equals statement?

Move one variable to the other side and make it a minus statement. eg:2 + 3 = 5then2 = 5 - 3


How do you write a statement of relationship in science?

A statement of relationship in science is typically written to explain the correlation or association between two variables. It should clearly outline how changes in one variable affect the other variable. This statement should be supported by evidence from experiments or observations conducted during scientific research.


Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total?

There are different ways of writing a pseudocode statement but the concept remains, it can be presented: /*Declare variables Total (number (3)) = 0 A (number (2)) =10 B (number (2)) =14 begin Total=A+B end


Write an if statement that sets the variable fees to 50 if the boolean variable max is true?

class d { private int fees=0; static void main(boolean max) { if(max) fees=50; } }