Advertisements
Advertisements
प्रश्न
Evaluate the following C++ expressions where x, y, z are integers and m, n are floating-point numbers. The value of x = 5, y = 4 and m=2.5;
n = x + y / x;
बेरीज
उत्तर
n = x + y / x;
= 5 + 4/5
= 5 + 0 (both x and y are int type. Therefore only integer part of quotient is considered)
= 5
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?