Set of multiple choice questions about programming with P17 prize
To become a true programmer, you first need to master the knowledge of this discipline. To help readers easily get acquainted with this subject, Network Administrator has synthesized and sent you extremely interesting multiple choice questions. Invite your reference.
Question 7. For structured types, which of the following is not allowed:
Assign variables to each other
Assign two array elements (structure type) to each other.
Assign an array element (structure type) to a variable or vice versa.
Assign two structured arrays with the same number of elements.
Question 8. Select the best sentence in the following sentences:
struct {int big; float soluong;} x[10]; float soluong;} x [10];
for (int i = 0; i <10; i ++) scanf ('% d% f', & x [i] .to, & x [i] .soluong);
The above program segment has a syntax error
Addressing operators are not allowed for 'to' and 'soluong' components
The address of the 'soluong' component leads to an improper operation
All is wrong
Question 9. To create a linked list, according to which of the following students is the correct declaration of the self-pointing structure to be used:
Student 1:
struct Sv * tiep;};
Student 2:
typedef
struct SV node;
node * tiep;};
Student 3:
typedef
struct struct * tiep;} node;
first
2
2 and 3
All 3 declare above
Question 10. To use the linked list, consider the following two statements (need 1KB to store information about a student):
Declaration 1: struct SV {thongtin;struct SV *tiep;}; struct SV * tiep;}; Declaration 2: SV struct {thongtin}; struct DS *;;;; (With 'thongtin' is a data component of the structure);
Choose the best sentence in the following sentences:
Declaration 1 takes more memory than declaring 2
Declaration 2 will help the program run faster when changing positions 2 students
Declaration 1 will help save the command more when writing the function to change the position of 2 students
Declaration 2 will help the program run faster when browsing the list