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

Input any no. and print all the the numbers that comes before it like this for e.g input = 4 0 01 012 0123 01234 plz answer it 2day

3 Answers  


please give me answer with details #include<stdio.h> main() { int i=1; i=(++i)*(++i)*(++i); printf("%d",i); getch(); }

3 Answers  


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

0 Answers  


what is the format specifier for printing a pointer value?

0 Answers  


What is meant by errors and debugging?

0 Answers  


how i m write c program 1.check prime number 2.prime number series

1 Answers  


How do you use a pointer to a function?

0 Answers  


When is the “void” keyword used in a function?

1 Answers  


What is a pointer and how it is initialized?

0 Answers  


Toggle nth bit in a given integer - num

5 Answers   Qualcomm,


What is C++

4 Answers  


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

0 Answers  


Categories