C-Pointers Question and Answer
C-Pointers Question and Answer
34. The function used for dynamic deallocation of memory is
- destroy ( )
- delete ()
- free ()
- remove ()
35. The function call realloc (ptr, 0) is
- same as free (ptr)
- used to clear the values in the address represented by ptr
- used to set the value of ptr to be ()
- invalid
36. In the expression *cp++
- *cp is evaluated first and *cp is incremented by 1.
- *cp is evaluated first and cp is incremented by 1.
- cp is incremented by 1 first and * is applied.
- cp is incremented by 1 first and * is applied to the previous value of cp.
37. The pointers can be used to achieve
- call by function
- call by reference
- call by name
- call by procedure
38. The operators &, *, ++ and -- have
- same precedence level and same assoiativity
- same associativity and different precedence level
- different precedence level and different associativity
- different precedence level and same associativity
39. Identify the invalid expression for given syntax:
float fnum [10], *fptr = fnum;
float fnum [10], *fptr = fnum;
- fjum + 4
- fptr[4]
- fnum=++fptr
- &fnum[4]
40. Identify the correct statement for given expression
float fnum [10];
float fnum [10];
- fnum is a pointer variable.
- fnum is a fixed address and not a variable
- fnum is an array variable.
- fnum is an address that can be modified.