What is (void*)0?

Home | Discussion Forum
Taiyari24Hour

What is (void*)0?



View More Related Question

1) What will be the output of the following C code?

#include <stdio.h>
int main()
{
char *p = NULL;
char *q = 0;
if (p)
printf(" p ");
else
printf("nullp");
if (q)
printf("q\n");
else
printf(" nullq\n");
}

2) A pointer is

3) Which of the following does not initialize ptr to null (assuming variable declaration of a as int a=0;)?

4) What will be the output of the following C code?

 #include <stdio.h>
int main()
{
int i = 10;
void *p = &i;
printf("%f\n", *(float*)p);
return 0;
}

5) What will be the output of the following C code?

 #include <stdio.h>
void main()
{
int x = 0;
int *ptr = &5;
printf("%p\n", ptr);
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.