Find errors
(1) m = ++a*5;
(2) a = b ++ -c*2;
(3)y = sqrt (1000);
Answer Posted / anand
1. compiler gives syntax error there should be any space
between increment or decrement operators and the variable.
2. even if some compilers accept this, then b++ - c*2 is
considered where c*2 is subtracted from the present value of
variable b and after that the value in variable b is
decremented by 1.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What are the similarities between c and c++?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
What are the different types of pointers used in c language?
Why is c called c?
How to write c functions that modify head pointer of a linked list?
Are there any problems with performing mathematical operations on different variable types?
Explain how does free() know explain how much memory to release?
How reliable are floating-point comparisons?
Write a program in c to replace any vowel in a string with z?
What is return in c programming?
What is pre-emptive data structure and explain it with example?
What is dangling pointer in c?
Why static is used in c?
When a c file is executed there are many files that are automatically opened what are they files?
Is swift based on c?