Find errors
(1) m = ++a*5;
(2) a = b ++ -c*2;
(3)y = sqrt (1000);
Answers were Sorted based on User's Feedback
Answer / sumalatha
b is the error because decrement of c is instead of --c it has -c
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / 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 |
Answer / renu
m will be error because the increment should be done before
the assignment symbol.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pranav
2) has an error because the LVALUE (b++) is not yet
incremented before evaluation
| Is This Answer Correct ? | 1 Yes | 0 No |
1 232 34543 4567654 can anyone tell me how to slove this c question
What is the difference between array and structure in c?
What does %2f mean in c?
what is the stackpointer
how to go with this?
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
What do you mean by c what are the main characteristics of c language?
WHAT IS MEANT BY LIFE?
Explain the differences between public, protected, private and internal.
every function has return the value?
what is the function of .h in #include<stdio.h> in c ?
23 Answers HCL, IBM, Wipro,
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +