Q1: which of the following statements about creating an array (size 10) of the below structure is true? struct Student{ string student_id; string student_name; string student_gender; }; A) Student[] std=new Student[10]; B) Student std[10]. 111101101 01010101111110 1010101010101 0101010

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 18RQ
icon
Related questions
Question
Q1: which of the following statements about creating an array (size 10) of the
below structure is true?
111101101
0101010111111
10101010101
010101010
1100
struct Student{ string student_id; string student_name; string student_gender; };
A) Student[] std=new Student [10];
B) Student std [10];
C) Student std[0-9];
D) std Student[10];
Q2: What is the syntax error in the following C++ code?
struct rectangl{
float length;
float area; };
A) A missing semicolon after last bracket
B) rectangl should be rectangle
C) A returned value
D) Missing rectangle width
E) No syntax error
Q3: How many syntax errors(if any) in the following classes definitions:
class Person
{
public: string job; int age_years;
001010
11101101
010101011111
1010101010101
11101010101
101100
Person(): { job="unemployed", age_years =19; };
void display(){ cout << job < <age_years;}
void walk() { cout << "I can walk." << endl;}
void talk() {cout << "I can talk." << endl; }
0101111
10101010101
110101010
class Science Teacher: private Person{
public: void teachScience() { cout << "I can teach Science." << endl; }
};
class Soccer : public Person{
Anti
public: void playFootball() { cout << "I can play Football." << endl; }
E) 4
F) 5
A) 6
B) 3
C) More than 6 syntax errors
D) Less than 3
Team
Transcribed Image Text:Q1: which of the following statements about creating an array (size 10) of the below structure is true? 111101101 0101010111111 10101010101 010101010 1100 struct Student{ string student_id; string student_name; string student_gender; }; A) Student[] std=new Student [10]; B) Student std [10]; C) Student std[0-9]; D) std Student[10]; Q2: What is the syntax error in the following C++ code? struct rectangl{ float length; float area; }; A) A missing semicolon after last bracket B) rectangl should be rectangle C) A returned value D) Missing rectangle width E) No syntax error Q3: How many syntax errors(if any) in the following classes definitions: class Person { public: string job; int age_years; 001010 11101101 010101011111 1010101010101 11101010101 101100 Person(): { job="unemployed", age_years =19; }; void display(){ cout << job < <age_years;} void walk() { cout << "I can walk." << endl;} void talk() {cout << "I can talk." << endl; } 0101111 10101010101 110101010 class Science Teacher: private Person{ public: void teachScience() { cout << "I can teach Science." << endl; } }; class Soccer : public Person{ Anti public: void playFootball() { cout << "I can play Football." << endl; } E) 4 F) 5 A) 6 B) 3 C) More than 6 syntax errors D) Less than 3 Team
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Passing Array as Argument
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning