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

Is javascript based on c?

0 Answers  


what is the maximum limit of row and column of a matrix in c programming. in linux .

4 Answers   NIIT,


what is memory leak?

3 Answers  


What 'lex' does?

0 Answers   Tech Mahindra,


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

0 Answers  






void main() { static int i = 5; if(--i) { main(); printf("%d ",i); } } what would be output of the above program and justify your answer? }

5 Answers   C DAC, CDAC, Infosys, Wipro,


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

0 Answers  


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

0 Answers  


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

0 Answers   IBM,


What is the auto keyword good for?

0 Answers  


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

0 Answers  


What are reserved words with a programming language?

0 Answers  


Categories