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 |
What is pointers in c?
give one ip, find out which contry
What is putchar() function?
what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1
int a[3][5]={ {1,2,3,4,5],{2,3,4,5,6},{10,11,12,13,14}}; int *p=&a; printf(ā%dā,*(*(x+1)+3));
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is the best way to store flag values in a program?
What are the types of variables in c?
What is call by value in c?
What is nested structure with example?
Why do u use # before include in a C Progam?
Write a program to exchange two variaables without temp