Find the output of the following program.
void main(){ printf("%d, %d", sizeof(int *), sizeof(int **));}

Find the output of the following program.

void main(){ printf("%d, %d", sizeof(int *), sizeof(int **));}
Correct Answer 2, 2

Every pointer regardless of its type whereas single pointer or pointer to pointer, needs only 2 bytes.

Size of pointer and int is 2 bytes in Turbo C compiler on windows 32 bit machine. So size of pointer is compiler specific. But generally most of the compilers are implemented to support 4 byte pointer variable in 32 bit and 8 byte pointer variable in 64 bit machine.

Related Questions

What is the output after compile and run the following code ? int Output = 10;
boolean b = false;
if((b == true) && ((Output += 10) == 20))
{
System.out.println("We are equal " + Output);
}
else
{
System.out.println("Not equal! " + Output);
}