Answer Posted / geetha
i++ and ++i mean the same thing when they form statements
independently,they behave differently.
for example:
i=5;
d=++i;
in this case the value is i,d =6.bcoz first increment and
next assign the value
i=5;
d=i++;
in this case the value of d=5 and i=6.bcoz first assign the
value next increment and it will be change the value i=6.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain what is the best way to comment out a section of code that contains comments?
How can a number be converted to a string?
How do I swap bytes?
What are pragmas and what are they good for?
What is the modulus operator?
can we have joblib in a proc ?
What is structure of c program?
Write a program to print "hello world" without using a semicolon?
What is a stream?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
Can you please explain the scope of static variables?
What is a scope resolution operator in c?
What is .obj file in c?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is sizeof in c?