void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / vivers
There are two different questions..
in which its asking the result for
1)(i++ + ++i)
answer will be---> 12
"as addition will takes place from left to right
step1: i++ = 5;
step2: value of i will be updated before taking value of
another operand and hence i = 6;
step3: ++i = 7 as first increment will happen and then value
will be used.
final result: 5 + 7 = 12"
2) (i+++++i)
answer will be---> compile error
"because illegal combination of operators"
best of luck...
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many bytes are occupied by near, far and huge pointers (dos)?
What are the types of type specifiers?
Explain what are the different file extensions involved when programming in c?
Do string constants represent numerical values?
Explain main function in c?
What is c value paradox explain?
Why is c still so popular?
What is d'n in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
How can I implement sets or arrays of bits?
What is the difference between printf and scanf in c?
What is cohesion and coupling in c?
Why pointers are used?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
When should volatile modifier be used?