|
Pointers
- Part I
|
|
[Q001]
Several declarations involving pointers are shown below.
Pick the correct solution.
int *ptr;
|
|
(a)ptr is a integer
variable (b)ptr is a pointer to an integer
quantity (c)Invalid statement (d)None
of these
|
|
|
|
[Q002] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*ptr[10];
|
|
(a)ptr
is a pointer to an integer quantity (b)ptr is a
pointer to a 10-element integer array (c)ptr is
a 10-element array of pointers to integer
quantities (d)None of these
|
|
|
[Q003] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
(*ptr)[10];
|
|
(a)ptr
is a pointer to an integer quantity (b)ptr is a
pointer to a 10-element integer array (c)ptr is
a 10-element array of pointers to integer
quantities (d)None of these
|
|
|
[Q004] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*ptr(void);
|
|
(a)ptr
is a pointer to an integer (b)ptr is a function
that returns a pointer to an integer
quantity (c)ptr is a function pointer that
returns integer quantity (d)None of
these
|
|
|
[Q005] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
ptr(int *a);
|
|
(a)Invalid
statement (b)ptr is a function that accepts an
argument which is a pointer to a integer returns an
integer quantity (c)ptr is a function
pointer (d)None of these
|
|
|
[Q006] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*ptr(int *a);
|
|
(a)Invalid
statement (b)ptr is a function pointer that
accepts an argument which is a pointer to a integer
returns an integer quantity (c)ptr is a
function that accepts an argument which is a pointer to
a integer returns a pointer to an integer
quantity (d)None of these
|
|
|
|
[Q007] Several declarations involving
pointers are shown below. Pick the correct
solution.
int (*ptr)(char *a);
|
|
(a)Invalid
statement (b)ptr is a pointer to a function
that accepts an argument which is a pointer to a
character returns an integer quantity (c)ptr is
a function that accepts an argument which is a pointer
to a character returns a pointer to an integer
quantity (d)None of these
|
|
|
|
[Q008] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
(*ptr(int *b))[5];
|
|
(a)Invalid
statement (b)ptr is a pointer to a function
that accepts pointer to an integer returns a 5-element
integer array (c)ptr is a function that accepts
an argument which is a pointer to a integer returns a
pointer to a 5-element integer array (d)None of
these
|
|
|
[Q009] Several declarations involving
pointers are shown below. Pick the correct
solution.
char ptr(int (*a)[]);
|
|
(a)Invalid
statement (b)ptr is a function that accepts an
argument which is a pointer to a integer array returns
an character quantity (c)ptr is a function that
accepts an argument which is an array of pointers to
integers returns an character quantity (d)None
of these
|
|
|
|
[Q010] Several declarations involving
pointers are shown below. Pick the correct
solution.
char ptr(int *a[]);
|
|
(a)Invalid
statement (b)ptr is a function that accepts an
argument which is a pointer to a integer array returns
an character quantity (c)ptr is a function that
accepts an argument which is an array of pointers
to integers returns an character
quantity (d)None of these
|
|
|
[Q011] Several declarations
involving pointers are shown below. Pick the correct
solution.
int *ptr(char
a[]);
|
|
(a)ptr is a function
pointer (b)ptr is a function that accepts an
argument which is a character array returns an
integer (c)ptr is a function that accepts an
argument which is a character array returns a pointer to
an integer quantity (d)None of
these
|
|
|
|
[Q012] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*ptr(char *a[]);
|
|
(a)ptr is a function
pointer (b)ptr is a function that accepts an
argument which is a pointer to a character array returns
a pointer to an integer quantity (c)ptr is a
function that accepts an argument which is a array of
pointers to characters returns a pointer to an integer
quantity (d)None of these
|
|
|
|
[Q013] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
(*ptr)(char (*a)[]);
|
|
(a)ptr is a function that accepts an
argument which is a pointer to a character array returns
a pointer to an integer quantity (b)ptr is a
pointer to a function that accepts an argument which is
a pointer to a character array returns an integer
quantity (c)ptr is a pointer to a function that
accepts an argument which is a array of pointers to
characters returns an integer quantity (d)None
of these
|
|
|
[Q014] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*(*ptr)(char (*a)[]);
|
|
(a)ptr
is a function that accepts an argument which is a
pointer to a character array returns a pointer to an
integer quantity (b)ptr is a pointer to a
function that accepts an argument which is a pointer to
a character array returns a pointer to an integer
quantity (c)ptr is a pointer to a function that
accepts an argument which is a array of pointers to
characters returns a pointer to an integer
quantity (d)None of these
|
|
|
|
[Q015] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*(*ptr)(char (*a)[]);
|
|
(a)ptr
is a function that accepts an argument which is a
pointer to a character array returns a pointer to an
integer quantity (b)ptr is a pointer to a
function that accepts an argument which is a pointer to
a character array returns a pointer to an integer
quantity (c)ptr is a pointer to a function that
accepts an argument which is an array of pointers to
characters returns a pointer to an integer
quantity (d)None of these
|
|
|
|
[Q016] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
(*ptr[10])(void);
|
|
(a)Invalid
statement (b)ptr is a function that returns an
integer quantity (c)ptr is a 10-element array
of pointers to functions. Each function returns an
integer quantity. (d)ptr is pointer to a
function that returns a pointer to a 10-element
integers
|
|
|
[Q017] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
(*ptr[10])(float a);
|
|
(a)Invalid
statement (b)ptr is a function that returns an
integer quantity (c)ptr is a 10-element array
of pointers to functions. Each function accepts an
argument which is a float and returns an integer
quantity. (d)ptr is pointer to a function that
accepts an argument which is a float and returns a
pointer to a 10-element integers
|
|
|
[Q018] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*(*ptr[10])(float a);
|
|
(a)Invalid
statement (b)ptr is a function that returns an
integer quantity (c)ptr is a 10-element array
of pointers to functions. Each function accepts an
argument which is a float and returns an integer
quantity. (d)ptr is a 10-element array of
pointers to functions. Each function accepts an argument
which is a float and returns a pointer to an integer
quantity.
|
|
|
[Q019] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*(*ptr[10])(float *a);
|
|
(a)Invalid
statement (b)ptr is a function that returns an
integer quantity (c)ptr is a 10-element array
of pointers to functions. Each function accepts an
argument which is a pointer to a float and returns an
integer quantity. (d)ptr is a 10-element array
of pointers to functions. Each function accepts an
argument which is a pointer to a float and returns a
pointer to an integer quantity.
|
|
|
[Q020] Several declarations involving
pointers are shown below. Pick the correct
solution.
int
*ptr(char (*a)[]);
|
|
(a)ptr
is a function pointer (b)ptr is a function that
accepts an argument which is a pointer to a character
array returns a pointer to an integer
quantity (c)ptr is a function that accepts an
argument which is a array of pointers to characters
returns a pointer to an integer
quantity (d)None of these
|
|
Solutions for the above
queries.
|
|
Back
|
|
Next
|
|