What is the difference between i++ and i+1 ?(in terms of memory)
Answers were Sorted based on User's Feedback
Answer / naresh m
i++ is increment i value by one .. there no need to assign any
other variable to store it..
but in case of i+1 here also incrementing value by one
but if u want to use it in below program we have to
store it in another variable..
so main difference is i++ has less memory compare to i+1
| Is This Answer Correct ? | 31 Yes | 3 No |
Answer / johnsm
i++ is an increment and assign to i but i+1 is just an
increment of i, but it doesnt mean the value in i got changed here.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / rohit
i++ is increment i value by one .. there no need to assign any
other variable to store it..
but in case of i+1 here also incrementing value by one
but if u want to use it in below program we have to
store it in another variable..
so main difference is i++ has less memory compare to i+1
the i++ and i+1 is one and the same who don't accept this answer they may apply this in "c" and then try to prove us wrong
| Is This Answer Correct ? | 3 Yes | 3 No |
What are high level languages like C and FORTRAN also known as?
what is the function of .h in #include<stdio.h> in c ?
23 Answers HCL, IBM, Wipro,
what is diff b/w huge & far & near pointer??
What do header files do?
related proverb of "dont count your chicken before it hatches"
What are the advantages of using linked list for tree construction?
write a own function to compare two strings with out using stringcomparition function?
Explain can static variables be declared in a header file?
what is the differnce between AF_INET and PF_INET?
5 Answers Systems Plus, Wipro,
What is the difference between fread buffer() and fwrite buffer()?
What is a shell structure examples?
what is the advantage of software development