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
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
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe444b5e4-3657-44ce-8fa3-69e9397b0e32%2F92529d86-76b8-4c13-b2d2-38aff7f8faeb%2Fdn4pfc_processed.jpeg&w=3840&q=75)
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

Step 1
Note: Due to company policies I am compelled to solve only one question and that is the first question. Please post other questions separately for me to solve them.
Step by step
Solved in 2 steps

Knowledge Booster
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.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education