MC answers needed please

Question 1 1.  Which of the following is the proper declaration of a pointer? int p; int &p; ptr p; int *p; Question 2 1.  Which of the following gives the memory address of integer variable x? *x x &x address (x) Question 3 1.  What is wrong with these statements:   int *ptr;   * ptr = 5; A pointer can not pont to a type of integer *ptr = 5;  is not the right way to reference a pointer to update the value it is pointing to A pointer must be initialized to a valid address before referencing it The statements are correct as is Question 4 1.  Which of the following provides the value stored at the address pointed to by the pointer called ptr? ptr value (ptr) * ptr &ptr Question 5 1.  Which statement declares and initializes a pointer to a character? char char_ptr = &c; char *char_ptr = &c; both a and b none of the above Question 6 1.  When precedence is applied, which is an equivalent statement to:  i2 = *p1 / 2 + 10; i2 = ((*p1) / 2 ) + 10; i2 = (p1 * 2 ) + 10; i2 = (*p1) / ( 2 + 10); none of the above Question 7 1.  Which is a valid way to to reference a member of a structure using the pointer variable emp_ptr? (*emp_ptr).id_number = 98401; emp_ptr -> id_number = 98401; Both a and b none of the above Question 8 1.  C has a specific pointer type, such as:  pointer int_ptr; True False Question 9 1.  A properly declared pointer in C can reference any element of an array, assuming the pointer is declared to point to same type as the array type True False Question 10 1.  A pointer is passed by value to a function True False

Looking for this or a Similar Assignment? Click below to Place your Order

Open chat