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
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
Explain how can you tell whether a program was compiled using c versus c++?
Write a program to find the biggest number of three numbers in c?
What is the difference between the local variable and global variable in c?
Explain how can I convert a number to a string?
What is static memory allocation?
Difference between MAC vs. IP Addressing
Tell me can the size of an array be declared at runtime?
why wipro wase
How do you use a pointer to a function?
The file stdio.h, what does it contain?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
What is the use of a ‘ ’ character?
Do array subscripts always start with zero?
shorting algorithmS