Is this a correct way for NULL pointer assignment?
int i=0;
char *q=(char*)i;
Answer: B
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, *p = &i;
foo(p++);
}
void foo(int *p)
{
printf("%d\n", *p);
}
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the program ?
#include
int main()
{
printf("%c\n", 7["IndiaBIX"]);
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?
Answer: D
No answer description available for this question.
Enter details here
What will be the output of the program ?
#include
void fun(void *p);
int i;
int main()
{
void *vptr;
vptr = &i;
fun(vptr);
return 0;
}
void fun(void *p)
{
int **q;
q = (int**)&p;
printf("%d\n", **q);
}
Answer:
Enter details here
What is the output of this C code?
int main()
{
int i = 97, *p = &i;
foo(&p);
printf("%d ", *p);
return 0;
}
void foo(int **p)
{
int j = 2;
*p = &j;
printf("%d ", **p);
}
Answer: A
No answer description available for this question.
Enter details here
A pointer is
Answer: C
No answer description available for this question.
Enter details here
What will be the output of the program ?
#include
int main()
{
char str1[] = "India";
char str2[] = "BIX";
char *s1 = str1, *s2=str2;
while(*s1++ = *s2++)
printf("%s", str1);
printf("\n");
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
Which of the following statements correct about k used in the below statement?
char ****k;
Answer: B
No answer description available for this question.
Enter details here
What is the output of this C code?
int x = 0;
void main()
{
int *const ptr = &x;
printf("%p\n", ptr);
ptr++;
printf("%p\n ", ptr);
}
Answer: B
No answer description available for this question.
Enter details here