Programming in C - Pointers

11. Consider the following program fragment.
static char wer[3][4] = {"bag", "let", "bud"};
char(*ptr)[4] = wer;
The putchar (* (wer [1] + 1)) ;

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


12. Consider the following program fragment.
static char wer[3][4] = {"bag", "let", "bud"};
char(*ptr)[4] = wer;
The possible output of printf ( "%d %d", wer, wer +1); is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


13. The operators > and < are meaningful when used with pointers, if

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


14. Choose the best answer. Prior to using a pointer variable

  • Option : C
  • Explanation :
    using a pointer variable without initializing it, will be disastrous, as it will have garbage values
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


15. Consider the two declarations
void *voidPtr;
char *charPtr;
Which of the following assignments are syntactically correct?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *