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
Can a pointer be volatile in c?
What is a program?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Why is c so important?
What is the data segment that is followed by c?
the question is that what you have been doing all these periods (one year gap)
How can I do serial ("comm") port I/O?
What is memory leak in c?
What is the purpose of clrscr () printf () and getch ()?
How to establish connection with oracle database software from c language?
What is a substring in c?
What is unsigned int in c?
can anyone please tell about the nested interrupts?
How can you be sure that a program follows the ANSI C standard?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }