What is the difference between i++ and i+1 ?(in terms of memory)

Answers were Sorted based on User's Feedback



What is the difference between i++ and i+1 ?(in terms of memory)..

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

What is the difference between i++ and i+1 ?(in terms of memory)..

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

What is the difference between i++ and i+1 ?(in terms of memory)..

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

Post New Answer

More C Interview Questions

How can I get Single byte from 'int' type variable? Can we alter single bit or multiple bits in int type variable? if so, How?

2 Answers  


What is preprocessor with example?

0 Answers  


Explain can static variables be declared in a header file?

0 Answers  


What is the difference between array and structure in c?

0 Answers  


How can I generate floating-point random numbers?

0 Answers  






The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

0 Answers  


program for validity of triangle from 3 side

7 Answers  


can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance

1 Answers   IBM,


in iso what are the common technological language?

0 Answers  


what is the use of ‘auto’ keyword?

1 Answers  


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

0 Answers  


What is wrong with this code such that it doesnt produce the input reversed? #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char Space = ' '; char LineOfText; float count; LineOfText = getchar(); while ((LineOfText = getchar()) != '/n'); { count = strlen(LineOfText) - 1; while (count >= 0) { putchar(LineOfText[count]); count--; } } getchar(); return 0; }

2 Answers  


Categories