From mboxrd@z Thu Jan 1 00:00:00 1970 From: arun.esd@gmail.com (arun kumar) Date: Thu, 27 Jan 2011 12:01:58 +0530 Subject: How to identity processor architecture In-Reply-To: References: <4D410BBF.10203@msys-tech.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org the size of the integer variable will be equal to your processor architecture(32bit or 64 bit). On Thu, Jan 27, 2011 at 11:56 AM, Enrico Granata wrote: > What if one is compiling 32bit code on a 64bit processor? Would 4 be an > acceptable result to you in that case? > > *Enrico Granata* > *Computer Science & Engineering Department (EBU3B) - **Room 3240* > *office phone 858 534 9914* > *University of California, San Diego* > > On Jan 26, 2011, at 10:07 PM, prabhu wrote: > > Hi Dear, > > I just wanna to know my processor architecture(32bit or 64 bit) through > c programming. > > According to me the sizeof of pointer will give the result. Like below > coding. > > int main() > { > int *ptr; > printf("%d",sizeof(ptr)); > } > > Please correct me if i am wrong... > > Any suggestion or help would be appreciated. > > Thanks, > Prabhu > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/fef7b460/attachment.html