<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Enrico,<br>
<br>
I am not sure.<br>
<br>
No, because 32bit code will tell the datatype size and i think pointer
variable depends on architecture. <br>
So 64 bit processor needs 64 address line to point the data location.
So pointer variable needs to be 8 byte.<br>
<br>
please correct me if i am worng.<br>
<br>
Thanks,<br>
Prabhu<br>
<br>
<br>
Enrico Granata wrote:
<blockquote cite="mid:D2CFBE97-FB3C-496B-8794-170F919D7B10@cs.ucsd.edu"
type="cite">
<div>What if one is compiling 32bit code on a 64bit processor? Would
4 be an acceptable result to you in that case?</div>
<br>
<div><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<div style=""><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<div style=""><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<div style=""><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<div style=""><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<div style="">
<div>
<div><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<div style=""><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<div style="">
<div>
<div><i>Enrico Granata</i></div>
</div>
<div><i>Computer Science & Engineering Department (EBU3B) - </i><i>Room
3240</i></div>
<div><i>office phone 858 534 9914</i></div>
<div><i>University of California, San Diego</i></div>
</div>
</span></div>
</span></span></div>
</div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></span></div>
<br>
<div>
<div>On Jan 26, 2011, at 10:07 PM, prabhu wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>Hi Dear,<br>
<br>
I just wanna to know my processor architecture(32bit or 64 bit) through
<br>
c programming.<br>
<br>
According to me the sizeof of pointer will give the result. Like below <br>
coding.<br>
<br>
int main()<br>
{<br>
int *ptr;<br>
printf("%d",sizeof(ptr));<br>
}<br>
<br>
Please correct me if i am wrong...<br>
<br>
Any suggestion or help would be appreciated.<br>
<br>
Thanks,<br>
Prabhu<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a moz-do-not-send="true"
href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>