60 583
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #52559 in C for Sujata Roy

Question #52559
what is the value of x?

x = 6 ["computer"] ;
Expert's answer
Solution.
Expressions6 ["computer"] is defined exactly as *((6) + ("computer")).
“computer”equivalent to pointer on constant array of chars
Constchar* someconststring ={‘c’,’o’,’m’,’p’,’u’,’t’,’e’,’r’,’\0’}
6constant integer Const Int someint=6;
So(6) + ("computer") equivalent to ( someconststring)+(6) as the
constant array of chars is located in memory continuously expressions pointed to 6 element of {‘c’,’o’,’m’,’p’,’u’,’t’,’e’,’r’,’\0’}
Indirection of this address equal to‘e’.
Answer:
 x=’e’;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions