A pointer is

Home | Discussion Forum

A pointer is

View More Related Question

1) What is (void*)0?

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

3) What will be the output of the program ?

 #include<stdio.h>
int main()
{
int i=3, *j, k;
j = &i;
printf("%d\n", i**j*i+*j);
return 0;
}

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

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

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

 #include <stdio.h>
int main()
{
int *ptr, a = 10;
ptr = &a;
*ptr += 1;
printf("%d,%d/n", *ptr, a);
}

UP Gk Online Test

taiyari24hour.com