Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Find errors
(1) m = ++a*5;
(2) a = b ++ -c*2;
(3)y = sqrt (1000);

Answers were Sorted based on User's Feedback



Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);..

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

Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);..

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

Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);..

Answer / renu

m will be error because the increment should be done before
the assignment symbol.

Is This Answer Correct ?    1 Yes 0 No

Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);..

Answer / srikanth karnati

(2)HAS ERROR

Is This Answer Correct ?    1 Yes 0 No

Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);..

Answer / pranav

2) has an error because the LVALUE (b++) is not yet
incremented before evaluation

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

What is Lazy evaluation in C? Give an example.

1 Answers  


code snippet for creating a pyramids triangle ex 1 2 2 3 3 3

4 Answers  


Describe static function with its usage?

0 Answers  


can we define a function in structure?

2 Answers  


Does * p ++ increment p or what it points to?

0 Answers  


What are dangling pointers in c?

0 Answers  


What is the scope of static variable in c?

0 Answers  


what is difference b/w extern & volatile variable??

6 Answers   Teleca,


What does sizeof return c?

0 Answers  


What is the difference between #include <header file> and #include “header file”?

0 Answers  


Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.

6 Answers   Wipro,


How can I access an I o board directly?

0 Answers  


Categories