#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 Posted / 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 |
Post New Answer View All Answers
Write a code to generate a series where the next element is the sum of last k terms.
Why do we need a structure?
Compare array data type to pointer data type
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
How can a string be converted to a number?
What are the types of unary operators?
What is meant by high-order and low-order bytes?
What is a constant and types of constants in c?
What is function and its example?
How to set file pointer to beginning c?
What is c value paradox explain?
Is sizeof a keyword in c?
How would you obtain the current time and difference between two times?
What is s in c?
Explain the difference between structs and unions in c?