3 votes 3 votes what wil be sizeof(void) and sizeof(void *) Programming in C programming-in-c + – Ravi prakash pandey asked Nov 12, 2017 • edited Nov 12, 2017 by Ravi prakash pandey Ravi prakash pandey 657 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes void is datatype which has size of 1 Byte like char, but void* is a pointer it is called as raw pointer. normally in c size of integer pointer is 2 byte but it depends upon the machine architecture. (i.e on 64 bit system it will be 8 Byte) harrygate answered Nov 12, 2017 • edited Nov 12, 2017 by harrygate harrygate comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments Arjun commented Nov 12, 2017 reply Follow Share @Joshi That is not true. In C long double is there which is of size 10 bytes. But sizeof pointer is not related to size of any other type. On 64-bit system, it is of size 8 bytes which is the norm today. But a 32 bit compiler can also run on a 64-bit system in which size of a pointer will be 4 bytes. Some 3rd grade colleges still have systems which runs only 16-bit compilers (who gave them Engineering college status? :O) and the result is such websites which you can see in some comment above. 2 votes 2 votes joshi_nitish commented Nov 12, 2017 reply Follow Share ok sir, thanks! 0 votes 0 votes Niraj Singh 2 commented Nov 12, 2017 reply Follow Share i think it is machine dependent ! 0 votes 0 votes Please log in or register to add a comment.