Computer Science, asked by kritika2727, 1 year ago

increment and decrement operators examples

Answers

Answered by Anonymous
4
pre increment =++a;
post increment=a++;
pre decrement= --a;
post decrement= a--;


kritika2727: Please take a =5 and b=6 and solve them . write the answer in comments.please
Anonymous: ok
Anonymous: a=5;
Anonymous: a++;
Anonymous: then value of a will be increased in coding
Anonymous: same is b
Answered by Tyagi3819
3
MAY THIS WILL HELP YOU
Attachments:

Tyagi3819: a++ is 7
kritika2727: a=5 then tell a++,++a,--a and a--
Tyagi3819: - -a is 6
kritika2727: how a++ is 7 .it should be 5 .I think so
Tyagi3819: a - - is 5
Tyagi3819: now is it okk
kritika2727: yes
kritika2727: hanks
kritika2727: thanks
Tyagi3819: it's ok
Similar questions