What will be the output of the program ?
#include
int main()
{
char *p;
p="hello";
printf("%s\n", *&*&p);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
In which header file is the NULL macro defined?
Answer: C
No answer description available for this question.
Enter details here
What is the output of this C code?
void foo(float *);
int main()
{
int i = 10, *p = &i;
foo(&i);
}
void foo(float *p)
{
printf("%f\n", *p);
}
Answer: B
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 = &x;
printf("%p\n", ptr);
ptr++;
printf("%p\n ", ptr);
}
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
int main()
{
int i = 97, *p = &i;
foo(&i);
printf("%d ", *p);
}
void foo(int *p)
{
int j = 2;
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
power(int**);
int main()
{
int a=5, *aa; /* Address of 'a' is 1000 */
aa = &a;
a = power(&aa);
printf("%d\n", a);
return 0;
}
power(int **ptr)
{
int b;
b = **ptr***ptr;
return (b);
}
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
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
Which is an indirection operator among the following?
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the program ?
#include
int main()
{
char *str;
str = "%d\n";
str++;
str++;
printf(str-2, 300);
return 0;
}
Answer: D
No answer description available for this question.
Enter details here
What substitution should be made to //-Ref such that ptr1 points to variable C?
int main()
{
int a = 1, b = 2, c = 3;
int *ptr1 = &a;
int **sptr = &ptr1;
//-Ref
}
Answer: A
No answer description available for this question.
Enter details here