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
What are the data types present in c?
How can I convert a number to a string?
What is merge sort in c?
What is equivalent to ++i+++j?
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); }
Which header file is used for clrscr?
What is calloc malloc realloc in c?
What is #ifdef ? What is its application?
Is c is a procedural language?
What is indirection?
FILE PROGRAMMING
What are the functions to open and close the file in c language?
What is the process to create increment and decrement stamen in c?
What is the difference between the = symbol and == symbol?
What is the use of ?: Operator?