68 723
Assignments Done
Successfully Done
In January 2019

Answer to Question #52559 in C for Sujata Roy

Question #52559
what is the value of x?

x = 6 ["computer"] ;
Expert's answer
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’.

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions