quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryبرمجة وتطوير البرمجيات schoolبكالوريوس event_available2026-07-14

السؤال

Transcribed Image Text:

(e) The value of iptr[3] is 4. Fay defined by this instruction is iptr. 3. (6 points) Select all answers that provide the correct information for the instructions 1 int iptr[4] (1,2,3); 2 int piptr; 3 cout << (*p) ++; (a) The iptr is a constant pointer. (b) The second instruction is illegal. (c) The third line of the code displays 2. (d) The third line of the code displays 1. (e) The pointers iptr and p are aliases. 4. (6 points) Select all answers that provide the correct information for the function 1 2 3 4 5 6 } int guess (int a, int size) { int c = 0; for (int *p-a; p<a+size; ++p) if ((*p) 3--0) ++c; return ci (a) The function guess () returns the size of the array a (b) The function guess () returns the number of elements in a divisible by 3 (c) The function guess () returns the number of nonzero elements in a (d) The pointer p is used to traverse all elements of a (e) The dereference *p is an integer

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top