ptr++
*ptr
++ptr
++*ptr
What will be the output of following program
void main()
{
int x,y = 10;
x = y * NULL;
printf(“\n %d \n", x);
}
error
0
10
Garbage value
stdio.h
stddef.h
stdio.h and stddef.h
math.h
*
&
&&
||
dealloc();
malloc(variable_name, 0)
free();
memalloc(variable_name, 0)
malloc() and memalloc()
alloc() and memalloc()
malloc() and calloc()
memalloc() and faralloc()
b->var;
b.var;
b-var;
b>var;
pointer to array
pointers to pointers
pointer to function
pointer to structure
int ptr;
int *ptr;
int &ptr;
int ptr*;
p is a pointer to an array of 10 integers
p is an array of 10 integer pointers
p is a pointer to 10 integers
p is an array of pointers to 10 integers
What will be the output of the following code?
int x = 10, y = 20; int *p1 = &x, *p2 = &y; printf("%d", *p1 + *p2)
20
30
Compiler error
The value of the variable it points to
The size of the pointer
The memory address of the variable it points to
Dereferences a pointer
Returns the value of a variable
Returns the address of a variable
Multiplies two values
function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
sizeof(a)
sizeof(a[0])
sizeof(a) / sizeof(a[0])
sizeof(a) * sizeof(a[0])
1
2
3
Undefined
If it does not exist, an error is returned
If it does not exist, it is created
If it exists, then data is written at the end
If it exists, error is returned
What does fp point to in the program?
int main() { FILE *fp; fp=fopen("trial", "r"); return 0; }
The first character in the file
A structure which contains a char pointer which points to the first character of a file
The name of the file
The last character in the file
Key sequenced structures, entry sequenced structures
Key sequenced structure, exit sequenced structures
Entry sequenced structures, exit sequenced structures
None of the above