PFC-quiz7 - thi trc nghim PFC- Quiz7 - slot 27 Ghi ch: Nhng...

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- Quiz7 - slot 27 Ghi chú: Nh ng câu không ghi đi m đ c hi u là 1 đi m. ượ 7.01. (0.5 đi m) Which of the following accesses a variable var in structure b? b->var; b.var; đúng b-var; b>var; 7.02. (0.5 đi m) Which of the following is a properly defined struct? struct {int a;} struct a_struct {int a;} struct a_struct int a; struct a_struct {int a;}; đúng 7.03. (0.5 đi m) Which properly declares a variable x of struct foo? struct Foo; Foo x; đúng foo; int foo; 7.04. (0.5 đi m) A structure contains a number of data types grouped together. These data types must be of the same type. TRUE FALSE đúng 7.05. What is the output when the sample code below is executed? struct Employee { char name[20]; int age; }; void foo(Employee h) { strcpy(h.name,"Hung"); h.age = 20;
Background image of page 1

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

View Full DocumentRight Arrow Icon
} void display(Employee g) { printf("%s %d ", g.name, g.age); } int main() { Employee t; t = {"Quang",25}; display(t); foo(t); display(t); return 0;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/05/2012 for the course PFC 101 taught by Professor Abc during the Spring '11 term at Hanoi University of Technology.

Page1 / 3

PFC-quiz7 - thi trc nghim PFC- Quiz7 - slot 27 Ghi ch: Nhng...

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