main()
{ int i=5;
printf("%d",++i + i);
} output is 10
------------------------
main()
{ int i=5;
printf("%d",i++ + i);
}output is 12
why it is so? give appropiate reason....
Answer Posted / ashi smita
in first program i is post increment than i=5 and i=5+5=10
than i is increment by 1 and the value of i is 6 but second
program first i is preincrement by 1 and the value of is 6
than sum of i is 12.
| Is This Answer Correct ? | 3 Yes | 10 No |
Post New Answer View All Answers
What is the difference between break and continue?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
What is selection sort in c?
List the different types of c tokens?
What are header files why are they important?
what is ur strangth & weekness
What is echo in c programming?
What is difference between far and near pointers?
Explain built-in function?
If errno contains a nonzero number, is there an error?
Explain what math functions are available for integers? For floating point?
Can we change the value of #define in c?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
write a c program in such a way that if we enter the today date the output should be next day's date.
How can I sort a linked list?