what will be the value of x if a=2 and b=4 int x=++a+b+++a++..
Can anyone tell this.
Answers
Answered by
1
Answer:
Operators in C
Operators are symbol which tells the compiler to perform certain operations on variables. For example, (*) is an operator which is used for multiplying two numbers.
There are different types of operators in C. Let's take a look at each type of them with few examples of each.
Arithmetic Operators
Relational Operators
Increment and Decrement Operators
Logical Operators
Assignment Operators
Arithmetic Operations
Arithmetic Operators are the type of operators which take numerical values (either literals or variables) as their operands and return a single numerical value.
Let's assume, 'a' is 8 and 'b' is 4.
Answered by
1
Step-by-step explanation:
The statement n += 4 is equivalent to:
n=n+4
The only difference between the two is their return value. The former increments ( ++ ) first, then returns the value of x , thus ++x . The latter returns the value of x first, then increments ( ++ ), thus x++ .
Similar questions
Accountancy,
2 months ago
English,
2 months ago
English,
5 months ago
Social Sciences,
11 months ago
Chemistry,
11 months ago
English,
11 months ago