What is the output of this C code?
void main()
{
int k = 5;
int *p = &k;
int **m = &p;
printf("%d%d%d\n", k, *p, **m);
}
Answer: A
No answer description available for this question.
Enter details here
What would be the equivalent pointer expression for referring the array element a[i][j][k][l]
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the program If the integer is 4bytes long?
#include
int main()
{
int ***r, **q, *p, i=8;
p = &i;
q = &p;
r = &q;
printf("%d, %d, %d\n", *p, **q, ***r);
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 = 10;
int *p = &i;
foo(&p);
printf("%d ", *p);
printf("%d ", *p);
}
void foo(int **const p)
{
int j = 11;
*p = &j;
printf("%d ", **p);
}
Answer: B
No answer description available for this question.
Enter details here
Which of the statements is correct about the program?
#include
int main()
{
int i=10;
int *j=&i;
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
What is the output of this C code?
void main()
{
int x = 0;
int *ptr = &5;
printf("%p\n", ptr);
}
Answer: D
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
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
Which of the statements is correct about the program?
#include
int main()
{
float a=3.14;
char *j;
j = (char*)&a;
printf("%d\n", *j);
return 0;
}
Answer: A
No answer description available for this question.
Enter details here
Are the expression *ptr++ and ++*ptr are same?
Answer: B
No answer description available for this question.
Enter details here
In the following program add a statement in the function fun() such that address of a gets stored in j?
#include
int main()
{
int *j;
void fun(int**);
fun(&j);
return 0;
}
void fun(int **k)
{
int a=10;
/* Add a statement here */
}
Answer: C
No answer description available for this question.
Enter details here