The Punjab College of commerce and computer sciences
Haroonabad ® Name: --------------------------------- Roll No: ----------------------- Time Allowed: 20Min Total Marks: 17 PAPER COMPUTER SCIENCE (OBJECTIVE) CLASS ICS-II
Q. #1:- MCQS. Encircle correct one. (10*1=17)
1. Which of the following is required after the closing brace of the structure declaration? A period B colon C semicolon D Ntone 2. A structure contain members of the same data type. A can B shouldn’t C cannot D None 3. Before a structure can be used, it must be A declared B initialized C Deallocated D None 4. The name of the structure is referred to as its A Parameter B Data type C arguments D None 5. Which of the following allows you to access structure members. A Structure access B Dot operator C Both a and b D None operator 6. Which of the following assigns a value to the hrsWage member of emp[2]? A emp[2]->hourly B emp2.hrsWage = C hrsWage[2].emp = D Emp[2].hrsWage Wage=100.00; 3.00; 71.50 = 400.00; 7. Look at the following structure declaration. struct student { char name[20]; int rollno; }; In this declaration, student is A an array B member C tag D None 8. Look at the following structure declaration. struct student { char name[20]; int rollno; }; In this declaration, rollno is A Member B a tag C an array D None 9. A struct cannot contain members with varying data types. A true B False C D 10. The structure tag can be any legal identifier. A true B False C D
(Best of Luck) P a p e r C o d e | 8502
The Punjab College of commerce and computer sciences
Haroonabad ® Name: --------------------------------- Roll No: ----------------------- Time Allowed: 20Min Total Marks: 17 PAPER COMPUTER SCIENCE (OBJECTIVE) CLASS ICS-II
Q. #1:- MCQS. Encircle correct one. (10*1=17)
1. Which of the following is required after the closing brace of the structure declaration? A period B colon C semicolon D Ntone 2. A structure contain members of the same data type. A can B shouldn’t C cannot D None 3. Before a structure can be used, it must be A declared B initialized C Deallocated D None 4. The name of the structure is referred to as its A Parameter B Data type C arguments D None 5. Which of the following allows you to access structure members. A Structure access B Dot operator C Both a and b D None operator 6. Which of the following assigns a value to the hrsWage member of emp[2]? A emp[2]->hourly B emp2.hrsWage = C hrsWage[2].emp = D Emp[2].hrsWage Wage=100.00; 3.00; 71.50 = 400.00; 7. Look at the following structure declaration. struct student { char name[20]; int rollno; }; In this declaration, student is A an array B member C tag D None 8. Look at the following structure declaration. struct student { char name[20]; int rollno; }; In this declaration, rollno is A Member B a tag C an array D None 9. A struct cannot contain members with varying data types. A true B False C D 10. The structure tag can be any legal identifier. A true B False C D