📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which of the following is a correct way to declare and

      initialize a pointer to an integer in C?
      A 'int *p = 10;' Correct Answer Incorrect Answer
      B 'int p = &value;' Correct Answer Incorrect Answer
      C 'int *p = &value;' (assuming 'int value;' is declared) Correct Answer Incorrect Answer
      D '*p = &value;' Correct Answer Incorrect Answer
      E 'int *p; p = value;' Correct Answer Incorrect Answer

      Solution

      Answer: C) 'int *p = &value;' (assuming 'int value;' is declared)

      Practice Next
      ask-question