#include<stdio.h>
main()
{ int i=5;
printf("%d",i*i-- - --i*i*i++ + ++i);
}
tell the answer with correct reason .specially reason is
important nt answer
ans by turbo c is -39
Answer / myname
It it not an easy question.
After investigating it a little bit, I would say:
- It is undefined behaviour, since "i" is being modified more than once between two sequence points.
- I bet that the turbo c answer is not -39, but -34 (5*5 - 4*4*4 + 5) = -34 (not important, anyway, since any other compiler can reorder the operations and give you any other result since, as I have previously said, it is undefined behaviour).
| Is This Answer Correct ? | 0 Yes | 0 No |
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
How many types of sorting are there in c?
. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.
What is #define used for in c?
swap 2 numbers without using third variable?
Diff: between this 2 classes in terms of memory class A { int i; char c; double d; }; class A { double d; int i; char c; }; How it is calculating?
How to write a program to receive an integer & find its octal equivalent by using for loop?
What is the difference between far and near ?
What is the output of below code? main() { static in a=5; printf("%3d",a--); if(a) main(); }
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
write a program that will accept two integers and will implement division without using the division operator if the second value is an odd number and will implement multiplication without using multiplication operator if the second value is an even number.
In a byte, what is the maximum decimal number that you can accommodate?