@sauravamatyaw:
i think so because it is depend upon the working of the compliler
first it evaluates the expression on right side as on right it is the ratio of two integers so compiler will evaluate in terms of int then assign its value to float
User Profile
Collapse
Profile Sidebar
Collapse
JATINCSE
Last Activity: Nov 11 '13, 05:11 PM
Joined: Sep 23 '13
Location:
-
use the value a is either in any format given 11.0/5.0 or 11.0/5 or 11/5.o so you will get the correct answerLeave a comment:
-
please suggest me the way to handle these type of problems.
i can predict the answer of these type of statement but the way of predicting is not clear to me that what actually the compiler is doingLeave a comment:
-
increment and decrement operator
please told me the answer and reason for the value of a and b
Code:#include<iostream.h> #include<conio.h> void main() {int a=3; int b = ++a + a++ + a-- + --a; cout<<"\n enter a:"<<a; cout<<"\n enter b:"<<b; getch(); }Last edited by Rabbit; Sep 23 '13, 06:31 PM. Reason: Please use [CODE] [/CODE] tags when posting code.
No activity results to display
Show More
Leave a comment: