The operator used to get value at address stored in a pointer variable is

Home | Discussion Forum
Taiyari24Hour

The operator used to get value at address stored in a pointer variable is



View More Related Question

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

 #include <stdio.h> int *f();
int main()
{
int *p = f();
printf("%d\n", *p);
}

int *f()
{
int *j = (int*)malloc(sizeof(int));
*j = 10;
return j;
}

2) 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;
}

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

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

4) Comment on the following pointer declaration.

 int *ptr, p;

5) What would be the equivalent pointer expression for referring the array element a[i][j][k][l]

UP Gk Online Test

taiyari24hour.com

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