Which of the following declaration throw run-time error?
Answer: D
No answer description available for this question.
Enter details here
Is the NULL pointer same as an uninitialised pointer?
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the program ?
#include
int main()
{
static char *s[] = {"black", "white", "pink", "violet"};
char **ptr[] = {s+3, s+2, s+1, s}, ***p;
p = ptr;
++p;
printf("%s", **p+1);
return 0;
}
Answer: A
No answer description available for this question.
Enter details here
What is the output of this C code?
int main()
{
int i = 11;
int *p = &i;
foo(&p);
printf("%d ", *p);
}
void foo(int *const *p)
{
int j = 10;
*p = &j;
printf("%d ", **p);
}
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the program ?
#include
int main()
{
void *vp;
char ch=74, *cp="JACK";
int j=65;
vp=&ch;
printf("%c", *(char*)vp);
vp=&j;
printf("%c", *(int*)vp);
vp=cp;
printf("%s", (char*)vp+2);
return 0;
}
Answer: D
No answer description available for this question.
Enter details here
What is the output of this C code?
void foo(int*);
int main()
{
int i = 10;
foo((&i)++);
}
void foo(int *p)
{
printf("%d\n", *p);
}
Answer: C
No answer description available for this question.
Enter details here
Are the three declarations char **apple, char *apple[ ], and char apple[ ][ ] same?
Answer: B
No answer description available for this question.
Enter details here
Is there any difference between the following two statements?
char *p=0;
char *t=NULL;
Answer: B
No answer description available for this question.
Enter details here
What is the output of this C code?
void main()
{
int a[3] = {1, 2, 3};
int *p = a;
int *r = &p;
printf("%d", (**r));
}
Answer: B
No answer description available for this question.
Enter details here
Will the program compile in Turbo C?
#include
int main()
{
int a=10, *j;
void *k;
j=k=&a;
j++;
k++;
printf("%u %u\n", j, k);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here