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

main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 Answers  


What is data structure in c programming?

0 Answers  


Explain Linker and Loader

5 Answers  


what is the structure?

4 Answers   TCS,


How will you declare an array of three function pointers where each function receives two ints and returns a float?

0 Answers   TISL,


write a programming in c language, 1 3 5 7 9 11

2 Answers   NIIT,


How to add two numbers with using function?

4 Answers  


What is bash c?

0 Answers  


What does static variable mean in c?

0 Answers  


Explain what are its uses in c programming?

0 Answers  


Define a structure to store roll no, name and marks of a student. Using the structure of above write a ‘C’ program to create a file “student.dat”. There must be one record for every student in the file. Accept the data from the user.

0 Answers  


You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less.

2 Answers   Microsoft,


Categories