PFC-quiz5 - thi trc nghim PFC- Quiz5 - slot 17 (10') Ghi...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Đ thi tr c nghi m PFC- Quiz5 - slot 17 (10') Ghi chú: Nh ng câu không ghi đi m đ c hi u là 1 đi m. ượ 5.01. (0.5 đi m) Which of the following is the proper declaration of a pointer? int &x; int x; ptr x; int *x; đúng 5.02. (0.5 đi m) Which of the following gives the memory address of integer variable a? *a; a; &a; đúng address(a); 5.03. (0.5 đi m) Which of the following gives the value stored in pointer a? a; val(a); *a; đúng &a; 5.04. (0.5 đi m) What will print when the sample code below is executed? int x = 11; printf(“%d %o %x”, x, x, x); 11 13 b đúng 11 b 13 11 15 b 11 b 15 5.05. (0.5 đi m) Which of the following statement would create a random number in the range of [1, 10] (inclusive) ? 1+ rand( )%10 đúng rand( )%10 1+ rand( )%11 rand( )%11 5.06. What will print when the sample code below is executed?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
char* myFunc (char *ptr) { ptr += 3; return (ptr); } int main() { char *x, *y; x = "HELLO"; y = myFunc (x); printf ("%s \n", y);
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

PFC-quiz5 - thi trc nghim PFC- Quiz5 - slot 17 (10') Ghi...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online