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 is the code in while loop that returns the output of given code?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Explain what is the benefit of using #define to declare a constant?
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello"
Is the following code legal? struct a { int x; struct a b; }
What does the function toupper() do?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
Do pointers need to be initialized?
What are macros in C?
what do structure language means?
Write a program that will read the input of any number of digits n in a row of shafh showing the breakdown of the printing and printing figures by the recursive function.
What are the advantages of using linked list for tree construction?