Size of int and ptr in 64 bit compiler
both the size of int and sizeof ptr is 4 byte in 32 bit machine.so why size of ptr is 8 byte in 64 bit machine
64bit == 8 bytes. The addressable memory space on 64-bit machine requires, well, 64bits (== 8 bytes) to specify the address of an arbitrary place in memory. Because a pointer in C/C++ has that semantics (to point to an arbitrary place in memory), its size on 64bit-machines is, well, 64-bits (aka 8 bytes).
#include<stdio.h>
#include<stdlib.h>
int main()
{
int * ptr;
int x;
printf ( "sizeof ptr =%d size of int =%d ",sizeof(ptr) ,sizeof(int));
return 0;
}
on compilation:
In function ‘main’:
11:1: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
11:1: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
./a.out
sizeof ptr =8 size of int =4
and where did you find the difference ?? My Compiler does not show any such inconsistency and neither the online compiler ..
Check this
http: // ideone.com / XrbOu7
AOL account setting +1-800-893-9752
It is very important to have latest and updated AOL account setting. If you are not on updated AOL account settings then you will not be able to send or receive email on your device or no matter any third party email software or client you may use.
To get latest and update setting for your AOL account you can contact AOL support on Toll-free +1-800-893-9752
contact aol member services, aol support phone number usa, aol email support phone number, aol email tech support number, aol email customer service number, aol email customer support, aol customer support telephone number, aol technical support contact number, aol com customer service phone number, download aol mail to computer, Aol email support phone number, aol gold desktop download, aol mail tech support number, aol mail hotline number, aol mail toll free number, contact aol mail support number, aol customer service number, aol support phone number, aol support number, aol mail repair
Why shouldn't it? What did you expect?
- Anonymous May 13, 2013