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 |
Explain the term printf() and scanf() used in c language?
dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
18 Answers Acropolis, HCL, Intel, TCS,
Is javascript based on c?
print ur name without using any semicolon in c/c++....
21 Answers Bosch, TCS, Wipro,
to get a line of text and count the number of vowels in it
Explain what is operator promotion?
What is the use of header files?
What are disadvantages of C language.
How many ways are there to swap two numbers without using temporary variable? Give the each logic.
What is the size of array float a(10)?