void main()
{
int i=5;
printf("%d",i++ + ++i);
}

Answer Posted / koushik ramesh

this program output is 12.

first is i++ is 5 only because this the post increment
first using the value after increment.

whenever i++ + the value of is 6.
++ i means this is the pre-increment.first increment
the value after using the variable this step i will become
7.
total is i++ =5
i++ + =6
++ i=7
i++ + ++i= 12. this is posted by Ramesh(MCA)Nizam
college.HYDERABAD

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to find binary of number?

3408


When we use void main and int main?

577


What are the characteristics of arrays in c?

603


write a c program for swapping two strings using pointer

2077


What is the use of a ‘’ character?

577






int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1116


How can I ensure that integer arithmetic doesnt overflow?

596


Explain what are multibyte characters?

613


Explain what does a function declared as pascal do differently?

628


What does node * mean?

700


What is a void pointer? When is a void pointer used?

614


Explain what does the format %10.2 mean when included in a printf statement?

767


What is 1d array in c?

590


How can you increase the size of a dynamically allocated array?

636


What is the difference between array and pointer?

558