Question

C++ data structure related question . I bold marked them thinking they are the answers. Let...

C++ data structure related question .

I bold marked them thinking they are the answers. Let me know if any of them are incorrect.

2. Which is NOT considered a data structure?

A. "Jennifer Lopez"

B. { "fn": "Jennifer", "ln": "Lopez" }

C. { "Jennifer", "Lopez" }

D. string fn, ln; fn = "Jennifer"; ln = "Lopez";

E. All of the options are data structure of some form

4. Given the following code segment, which is consider a data item?

struct Student                           

{

short id;

string name;

char gender;

};

....

Student jlo;

A. id

B. name

C. gender

D. Student

E. jlo

5. Which is not a "scalar" value?

A. 623

B. "Jennifer Lopez" (or this?)

C. p = { 14, 15 }

D. 6.2e-23

7. Given the following sample structure named "weekday", which can create an instance named

"w3"?

struct weekday

{

int i;

string name;

};

A. w3 = new weekday(2, "Tue");

B. weekday w3 = new weekday(2, "Tue");

C. weekday w3 = { 2, "Tue" };

D. weeksay [w3] = { 2, "Tue" };

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Note: All your answers are correct
-----------------------------------
Question 2:
All of the options are data structure of some form

Question 4:
Student is consider a data item.
All others are variable names.
Answer:
Student

Question 5:
p = { 14, 15 } is an array. Not a scalar value.
Answer:
C. p = { 14, 15 }

Question 7:
weekday w3 = { 2, "Tue" }; can create an instance named w3 given structure named weekday
Answer:
C. weekday w3 = { 2, "Tue" };

​​​​​​​

Add a comment
Know the answer?
Add Answer to:
C++ data structure related question . I bold marked them thinking they are the answers. Let...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ Question Objectives After this homework assignment, students should be able to:  Implement user-defined structs...

    C++ Question Objectives After this homework assignment, students should be able to:  Implement user-defined structs using given specifications Use file input to populate structs Background While working to improve the LionPath website, you discovered a way to generate formatted text files that contains information about students' schedules for the upcoming semester. Consider the example below: FNAME: Andrew MINIT: S LNAME: Yu ID: 912345678 USER: auy77 CMPSC121-002-003L - M 9 05 AM 50 Lecture - T 10 05 AM 110...

  • IN C PLEASE Question 16 A. Consider “inclass2.h” header file. Define a structure which can hold...

    IN C PLEASE Question 16 A. Consider “inclass2.h” header file. Define a structure which can hold the following student information: id, first name, last name, and gpa. Use appropriate header file guards. ( Max size of first and last name is 20, id is 7 and gpa is double). B. Consider an array of student struct with the MAX_SIZE 10 and a first name. These will be provided as an input to your function. Write a function/method that using the...

  • Write a c++ program which uses a structure having the indicated member names to store the...

    Write a c++ program which uses a structure having the indicated member names to store the following data: Name (student name) IDnum (student ID number) Tests (an array of three test scores) Average (average test score) Grade (course grade) The program will keep a list of three test scores for one student. The program may prompt the user for the name, ID number, and test scores, or these may be assigned within the program. The average test score will be...

  • Hw08FinalProjectStudentList.txt: (Data structure is Array List) 1,Simon,Jefferson,gy3085,4.0,2019 2,John,Johnson,xy1242,3.9,2019 3,Kayla,Anderson,as1324,3.8,2019 4,David,Kidman,re5423,3.8,2017 5,Mary,Coleman,ze7698,3.8,2018 Description: This assignment is

    Hw08FinalProjectStudentList.txt: (Data structure is Array List) 1,Simon,Jefferson,gy3085,4.0,2019 2,John,Johnson,xy1242,3.9,2019 3,Kayla,Anderson,as1324,3.8,2019 4,David,Kidman,re5423,3.8,2017 5,Mary,Coleman,ze7698,3.8,2018 Description: This assignment is going to evaluate your overall knowledge of the Java Programming. You shall implement a program which can store and retrieve student list. The program has a menu that you can take input from console, and the user can choose between the items. The program data is in the HwO8FinalProjectStudentList.txt file. Required Items: 1. The program must show a menu to user and ask the user...

  • please use the c language Assignment 12 The program to write in this assignment is a...

    please use the c language Assignment 12 The program to write in this assignment is a program that calculates score statistics and manages the grades of the students. First, the student list and are given in a file named "student.dat" as in the following: 이성우 77 홍길동 88 scores 201 1710086 2012700091 This program reads the input file "student.dat" and keeps this data in a linear linked list. Each node must be a struct which contains the following: student id...

  • in C porgraming . use #include〈stdio.h〉 #include〈stdlib.h〉 Assignment 12 The program to write in this assignment...

    in C porgraming . use #include〈stdio.h〉 #include〈stdlib.h〉 Assignment 12 The program to write in this assignment is a program that calculates score statistics and manages the grades of the students. First, the student list and scores are given in a file named "student.dat" as in the following: 이성우 77 홍길동 88 2011710086 2012700091 This program reads the input file "student.dat" and keeps this data in a linear linked list. Each node must be a struct which contains the following: student_id,...

  • I NEED UML FOR THIS QUESTION ONLY! This question 9 requires you to (i) draw a...

    I NEED UML FOR THIS QUESTION ONLY! This question 9 requires you to (i) draw a UML diagram and (ii) address 9(a) to 9(e) questions. • Draw a UML diagram (in the style covered in week 7) to represent the data entities model of all custom data types in the given program. You are required to paste your UML diagram to On Track 9.2P resource document for 9.2P submission. Your assessor will evaluate your work. • Analyse the information of...

  • Rework this project to include a class. As explained in class, your project should have its...

    Rework this project to include a class. As explained in class, your project should have its functionalities moved to a class, and then create each course as an object to a class that inherits all the different functionalities of the class. You createclass function should be used as a constructor that takes in the name of the file containing the student list. (This way different objects are created with different class list files.) Here is the code I need you...

  • I have a C++ code that lets me enter, display and delete a student record. I...

    I have a C++ code that lets me enter, display and delete a student record. I need to implement a function that prints the average grade score of the students I input. Below is my code and a picture of how my code looks right now. #include<iostream> #include<stdlib.h> using namespace std; //Node Declaration struct node {    string name;    string id;    int score;    node *next;   }; //List class class list {        private:        //head...

  • Hello, I need to implement these small things in my C++ code. Thanks. 1- 10 characters...

    Hello, I need to implement these small things in my C++ code. Thanks. 1- 10 characters student first name, 10 characters middle name, 20 characters last name, 9 characters student ID, 3 characters age, in years (3 digits) 2- Open the input file. Check for successful open. If the open failed, display an error message and return with value 1. 3- Use a pointer array to manage all the created student variables.Assume that there will not be more than 99...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT