pointer
1.7 #include void fun(int *ptr)
{
*ptr=30;
}
int main()
{
int y=20; fun(&y);
printf(“%d”,y);
return 0;
}
The output of above program is
A. 20
B. 30
C. Compiler error
D. Runtime error
ans B. 30
*ptr++ is equivalent to
A) ptr++
B) *ptr
C) ++ptr
D) ++*ptr
What will be the output of the following code?
main()
{
int i=2,*j; j=&i;
printf("%d",i**j*i+*j);
}
A) Syntax error due to Invalid expression in printf
B) Print junk value
C) 16
D) 10
true /false
Two pointer variables cannot be subtracted.
Are the three declarations char **apple, char *apple[], and char apple[][] same? FALSE
The expressions *ptr++ and ++*ptr are same FALSE
Are the expression *ptr++ and ++*ptr are same? true
___pointer_______ is a variable which holds the address of another variable
A pointer that does not point to any data object is ___null_____
Write a note on pointers and its uses. What do you mean by refreshing and de-refreshing of a pointer variable.?
After incrementing a float pointer ptr by 1 it would be incremented by _(I) 4 Bytes_______________
The ______(L) *___________ operator returns the value of the variable to which its operand points.
A pointer in C which has not been initialized is known as ___wild______ pointer.
__astreek______ symbol is used access the value pointed by a pointer.
Explain about „Pointer to function „ with suitable example
Explain the relation of array and pointer with
example.
1.7 #include
*ptr++ is equivalent to
A) ptr++
B) *ptr
C) ++ptr
D) ++*ptr
What will be the output of the following code?
main()
{
int i=2,*j; j=&i;
printf("%d",i**j*i+*j);
}
A) Syntax error due to Invalid expression in printf
B) Print junk value
C) 16
D) 10
true /false
Two pointer variables cannot be subtracted.
Are the three declarations char **apple, char *apple[], and char apple[][] same? FALSE
No comments:
Post a Comment