which all of the following are valid expressions in c
A. a=2+(b=5)
B. a=b=c=5
C. a=b%c
D. a=(a+b-c)*2.2
E. all of the above
Answer: Option E
Solution (By Examveda Team)
In C, expressions are combinations of variables, operators, and values that yield a result when evaluated.Option A: a=2+(b=5) - This is a valid expression. The assignment b=5 is evaluated first, and then 2+(5) is assigned to a.
Option B: a=b=c=5 - This is a valid expression. Multiple assignments are evaluated from right to left, so c is assigned 5, then b is assigned c, and finally a is assigned b.
Option C: a=b%c - This is a valid expression. The modulus operator % calculates the remainder of b divided by c, and the result is assigned to a.
Option D: a=(a+b-c)*2.2 - This is a valid expression. The operations inside the parentheses are evaluated first, followed by multiplication with 2.2, and the result is assigned to a.
Therefore, the correct answer is Option E: all of the above.
Related User Ask Questions
Which of the following is not a primary function of a Bank?
A. Granting Loans
B. Collecting Cheques/Drafts customers
C. Facilitating import of goods
D. Issuing Bank Drafts
A. Regulatory jurisdictional fight between SEBI and IRDA
B. They don’t offer better tax benefits
C. They offer lesser returns compared to traditional insurance policies
D. All of the above
The Chameli Devi Jain Award is given for an outstanding woman ____?
A. Scientist
B. Reporter
C. Player
D. Teacher

Join The Discussion