☺Note: All Questions are note it in your copy. Question No-1: Evaluate the following C++ expressions where a, b, c are integers and d, f are floating point numbers. The Value of a = 6, b = 2, d = 1.5 a) f = a + b/a b) c = ( a++) * d + b c) c = a – ( b++ ) * (–a) Question No:2 Explain Unary,Binary and Ternary Operators? Give Example of each type. Answer:- Unary Operators : Operators that operates or works with a single operand are unary operators. Example: (++, –) Binary Operators : Operators that operates or works with two operands are binary operators. Example: +, –, *, /. Example: +, –, *, /. Ternary Operator : These operator requires 3 expressions or operands to function. Example: Conditional operator- Expression1 ? Expression2 : Expression3 . Here, Expression1 is the condition to be evaluated. If the condition(Expression1) is True then we will execute and return the result of Expression2 el...
This comment has been removed by the author.
ReplyDeleteYou are impressive. The article is clear as it is. It clearly communicated the idea of why functions are beneficial in programming. If anyone want to learn C++ you can visit our website. This make a mastered in C++ programing. We have complete C++ tutorials teaching you to program in C++. Whether you’ve had any prior experience programming or not, the tutorials on this site will walk you through all the steps you’ll need to know in order to create and compile your programs..
ReplyDeleteThank you very much!