tag:blogger.com,1999:blog-959939550345671470.post8569091043810346792..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: What is the ram of a computer?Priyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-959939550345671470.post-71427558323543822802015-05-20T12:45:36.227+05:302015-05-20T12:45:36.227+05:30My understanding is like this.
int a = 4;
means a ...My understanding is like this.<br />int a = 4;<br />means a = 0X 0004; => 00000000,00000100;<br />Since little endian.....Lower Byte in Lower Address and Higher Byte in Higher Address.<br />So if lower byte 00000100 address is 5000......higher byte 00000000 address is 5001....<br />is it ok?<br /><br />..BURRA..Anonymoushttps://www.blogger.com/profile/13369627897515110087noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-35750530530325750482014-06-26T00:26:19.864+05:302014-06-26T00:26:19.864+05:30what if the int hold 4 byteswhat if the int hold 4 bytesAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-73597927905508813502013-08-17T00:33:29.325+05:302013-08-17T00:33:29.325+05:30Hello friends its not clear to me why 00000100 is ...Hello friends its not clear to me why 00000100 is not stored in the second byte, like normally we do in binary number system 00000000 00000100 ,is there any kind of big endian or little endian concept out here....Nayan Mani Baruahhttps://www.blogger.com/profile/10868722975692233747noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-38701276071818716562013-05-22T18:20:13.973+05:302013-05-22T18:20:13.973+05:30compile this:
#include
int main()
{
int ptr=5;
p...compile this:<br /><br />#include<br /><br />int main()<br />{<br />int ptr=5;<br />printf("%X\n%X",ptr,&ptr+1);<br />ptr=ptr+1;<br />printf("\n%X\n%X",ptr,&ptr+2);<br />ptr=ptr+1;<br />printf("\n%X\n%X",ptr,&ptr+3);<br /><br />return 0;<br />}<br />matheen smart viphttps://www.blogger.com/profile/04678260382965344126noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-79885362528138217662013-05-22T18:17:54.996+05:302013-05-22T18:17:54.996+05:30This comment has been removed by the author.matheen smart viphttps://www.blogger.com/profile/04678260382965344126noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-34952930119576644872013-05-03T09:23:11.643+05:302013-05-03T09:23:11.643+05:30nopes..
here actually storage of int started form ...nopes..<br />here actually storage of int started form 0x4999<br />0x4999 00000000<br />0x5000 00000100prashant aggarwalhttps://www.blogger.com/profile/05289464219328570685noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-63576098292601402232013-05-03T09:22:33.310+05:302013-05-03T09:22:33.310+05:30nopes..
here actually storage of int started form ...nopes..<br />here actually storage of int started form 0x4999<br />0x4999 00000000<br />0x5000 00000100<br />prashant aggarwalhttps://www.blogger.com/profile/05289464219328570685noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-41653528216575498012013-04-07T17:21:08.699+05:302013-04-07T17:21:08.699+05:30Sorry it's absolutely correct i think!
If we t...Sorry it's absolutely correct i think!<br />If we take array of int like this..<br /><br />int[2] a;<br /><br />memory allocated for 2 sequential variables.<br /><br />In C, int is 2 bytes.<br /><br />completely 4 cells are allocated!<br />2 cells - 1 variable<br />2 cells - another 2nd variable.<br /><br />1st variable: 1st cell address is 100,<br /> 2nd cell address is 101.<br Anonymoushttps://www.blogger.com/profile/04719949314063883616noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-29496581097883834672013-04-07T16:45:13.975+05:302013-04-07T16:45:13.975+05:30address is 5002!
edit it immediately!address is 5002!<br />edit it immediately!Anonymoushttps://www.blogger.com/profile/04719949314063883616noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-25600584977434746862013-04-05T10:11:54.518+05:302013-04-05T10:11:54.518+05:30here integer takes 2-bytes length, so the next add...here integer takes 2-bytes length, so the next address 5002.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-68601764328738431532011-10-12T07:06:06.814+05:302011-10-12T07:06:06.814+05:30Thanks.Thanks.dinhpqhttps://www.blogger.com/profile/02076362924110387620noreply@blogger.com