98 972
Assignments Done
98.9%
Successfully Done
In May 2021

# Answer to Question #52559 in C for Sujata Roy

Question #52559
what is the value of x?

x = 6 [&quot;computer&quot;] ;
1
2015-05-15T03:24:53-0400
Solution.
Expressions6 [&quot;computer&quot;] is defined exactly as *((6) + (&quot;computer&quot;)).
&ldquo;computer&rdquo;equivalent to pointer on constant array of chars
Constchar* someconststring ={&lsquo;c&rsquo;,&rsquo;o&rsquo;,&rsquo;m&rsquo;,&rsquo;p&rsquo;,&rsquo;u&rsquo;,&rsquo;t&rsquo;,&rsquo;e&rsquo;,&rsquo;r&rsquo;,&rsquo;\0&rsquo;}
6constant integer Const Int someint=6;
So(6) + (&quot;computer&quot;) equivalent to ( someconststring)+(6) as the
constant array of chars is located in memory continuously expressions pointed to 6 element of {&lsquo;c&rsquo;,&rsquo;o&rsquo;,&rsquo;m&rsquo;,&rsquo;p&rsquo;,&rsquo;u&rsquo;,&rsquo;t&rsquo;,&rsquo;e&rsquo;,&rsquo;r&rsquo;,&rsquo;\0&rsquo;}
Indirection of this address equal to&lsquo;e&rsquo;.
x=&rsquo;e&rsquo;;

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!