Given the variables p, q are of char type and r, s, t are of int type. Select the right statement?

1. t = (r * s) / (r + s);
    2. t = (p * q) / (r + s);

a) 1 is true but 2 is false
b) 1 is false and 2 is true
c) both 1 and 2 are true
d) both 1 and 2 are false

1 thought on “Given the variables p, q are of char type and r, s, t are of int type. Select the right statement?”

  1. c
    Explanation: Every character constant has an integer value. Also char belongs to the integral type hence arithmetic and logical operations can be performed on them.

Leave a Comment