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 |
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?
What is preprocessor with example?
Explain can static variables be declared in a header file?
What is the difference between array and structure in c?
How can I generate floating-point random numbers?
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
program for validity of triangle from 3 side
can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance
in iso what are the common technological language?
what is the use of ‘auto’ keyword?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
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; }