Redirected
edited by
973 views
0 votes
0 votes

The associativity of which of the following operators is Left to Right, in C++?

  1. Unary Operator
  2. Logical not
  3. Array element access
  4. addressof
edited by

5 Answers

1 votes
1 votes

LR - Left to Right

RL - Right to Left

Array element access is Left to Right.

0 votes
0 votes
All 4 option operators associativity is right to left

(1) Unary operator means + or -. Associativity of these operators are right to left

(2) Logical NOT bitwise complement associativity is right to left

(3) Array element access means dereference operator also associativity right to left

(4) Address of operator also has associativity right to left
0 votes
0 votes
(1) Unary Operator    right to left      

(2) Logical Not: right to left

(3) Array Element Access: left to right (highest precedence)

(4) address of (&): right to left

option 1,2 and 4 have equal precedence.

option 3 has the highest precedence among above.
0 votes
0 votes

Here we are converting a binary number to octal that is we are converting a number from base 2 system to base 8 i.e. 2 3.

Hence we have to take every 3 digits from least significant bit and convert it to octal form. 

for the given number 1011101011. Taking every 3 digits from LSB , we get 001 | 011 | 101 | 011   (we have appended 2 zeros at the beginning). Now 001=1; 011=3; 101=5; 011= 3. Hence answer is 1353 in octal 

Answer:

Related questions

1 votes
1 votes
2 answers
1
Arjun asked Nov 5, 2017
3,067 views
Which speed up could be achieved according to Amdahl's Law for infinte number of processes if $5\%$ of a program is sequential and the remaining part is ideally parallel?...
0 votes
0 votes
1 answer
2
Arjun asked Nov 5, 2017
2,519 views
Which of the given wireless technologies used in IoT, consumes the least amount of power?ZigbeeBluetoothWi-FiGSM/CDMA
0 votes
0 votes
2 answers
3
Arjun asked Nov 5, 2017
4,592 views
Which of the following is not a Clustering method?K-Means methodSelf Organizing feature map methodK- nearest neighbor methodAgglomerative method