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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the data types present in c?

621


How can I convert a number to a string?

602


What is merge sort in c?

638


What is equivalent to ++i+++j?

639


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

910






Which header file is used for clrscr?

571


What is calloc malloc realloc in c?

587


What is #ifdef ? What is its application?

640


Is c is a procedural language?

589


What is indirection?

645


FILE PROGRAMMING

1773


What are the functions to open and close the file in c language?

589


What is the process to create increment and decrement stamen in c?

583


What is the difference between the = symbol and == symbol?

617


What is the use of ?: Operator?

660