1. string color = "Yellow"; //What does this code do? a. declares a structure b. calls a function c. creates a character array d. creates an object 2. The strcmp function returns ____________________. a. 0 if the two strings are equal b. a negative value if the first argument is alphabetically less than the second c. a positive value if the first argument is alphabetically greater than the second d. all of a through c are true
Q: iostream> using namespace std; string name; int number; int age; string city;
A: It is defined as a direct descendant of C programming language with additional features such as type…
Q: Write an Octave function called cale num vowels.m that takes as input a string of any length. The…
A: Given: Write an Octave function called cale_num_vowels.m that takes as input a string of any length.…
Q: write the psuedocode and drow the flowchart Create a program to enter grades and calculate averages…
A: In this question it asked to give the pseudocode and draw a flowchart. The question needs to create…
Q: PERSON String name String address int age Person() Person(name,address,age) toString() equals(Object…
A: In questions with multiple questions, we must solve the first one.
Q: The main function creates 5 pixels with random red, green, and blue values. Complete the id_color…
A: So you create a pixel inside the main function five times (using for loop) and you call the…
Q: Create a class Student that contains three members: roll no, name and mark, and three functions.…
A: Program: #include <iostream> using namespace std; //define array size #define MAX 40 class…
Q: #include #include #include #include using namespace std; class Movie { private:…
A: According to the information given:- We have to write a program on the basis of instruction mention.
Q: 1. The circle has two data members, a Point representing the center of the circle and a float value…
A: #include<stdio.h>#include<math.h> typedef struct{ float x; float y;}Point; typedef…
Q: 1. The file Final.txt contains student grades on a final exam. Write a program that displays the…
A: NOTE - As per our guidelines I have written the code, for other parts please post the separate…
Q: #include #include #include using namespace std; class Movie { private: string title =…
A: It is defined as a powerful general-purpose programming language. It can be used to develop…
Q: C PROGRAMMING ONLY) 4. Man's Best Friend by CodeChum Admin We all know what man's best friend is.…
A: #include <stdio.h>#include <stdlib.h> typedef struct Dog{ char *breed;}Dog; void…
Q: Grade Book A teacher would like to assign a letter grade to a student, based on student's test…
A: #include<iostream>#include<string.h>#include<stdlib.h>using namespace std;string…
Q: xplain Structures and how this code works: - Imagine you're teaching the material to someone who…
A: Java is one of the languages, which is considerably used in many sectors of Computer. In older…
Q: The phone numbers of the companies are stored in the phones.txt. The area codes are missing in some…
A: Answer :- The functions to readFromFile that reads all the phone numbers from the file phones.txt…
Q: Dart game: Dart location Write a function called DartNumbers() that takes the location of darts…
A: In given radius of area C is 1,B is 2 and A is 3. Then total area of circular region with radius 3…
Q: Unfair hurdles are hurdles which are either too high, or way too close together. Create a function…
A: Algorithm - Take input from user. Now use the below logic - let isTooTall = arr.length > 3;…
Q: 9. A function's return type may not be an array. 10. An array must be initialized when it is…
A: array data structure: An array is a linear data structure that stores the elements start from the…
Q: Using C/C++ programming language, solve the following problems. typedef structure { int phoneID;…
A: GIVEN: Using C/C++ programming language, solve the following problems. typedef structure { int…
Q: Write a program that reads students’ names followed by their test scores. The program should output…
A: The complete code is given below with comments.
Q: Using C/C++ programming language, solve the following problems. typedef structure { int phoneID;…
A: GIVEN: 4. Write a function that will find all the devices from a specific country and print the…
Q: __________ Arrays where the index is a string value. a. Positive b. None c. Associative d. Numeric
A: Given: __________ Arrays where the index is a string value. a. Positive b. None c.…
Q: separate .py def triangle(base, height): area=0.5*base*height print("Triangle Area: ", area) def…
A: The above question is solved in step 2 :-
Q: Q5: Complete the function that calculates the position of an object at any time t> 0. The initial…
A: code def calculate_position(s0,u0,a,t): position = u0*t + 0.5*a*t*t position=position+s0…
Q: Function 4: Spell Correction _spellCorrection( string1, string2 ) Create a JavaScript function…
A: JavaScript function expression that meets the requirements
Q: doubleVowel Write a function doublevowel that accepts a word as an argument and returns True if the…
A: I give the code in Python as per your requirement along with output and code screenshot
Q: #include #include #include #include using namespace std; class Movie { private: string…
A: We will create a structure named StudentRec and then we will add students records accordingly and…
Q: GRADEBOOK PROJECT Attached Files: Gradebook.docx (18.278 KB) Gradebook Practicla Project: use the…
A: Here we have given the program for given appropriate grades. You can find the code in step 2.
Q: C++ Coding Write a program that asks a teacher to enter the student's name and the grades received…
A: GIVEN: C++ Coding Write a program that asks a teacher to enter the student's name and the grades…
Q: Write code to assign title and duration details to currMovie, and store currMovie in favorite…
A: Given: #include <iostream>#include <string>#include <vector>using namespace std;…
Q: 1. (Check password) Some Web sites impose certain rules for passwords. Write a function that checks…
A: Given: use Python
Q: 1- printlnfo: This function prints your name and ID to the screen. 2- caleShapeArea: This function…
A: First, we need to display the menu, then we need to read the required input parameters and then…
Q: Using C/C++ programming language, solve the following problems. typedef structure { int phoneID;…
A: Given: solve the following problems.typedef structure {int phoneID; char phoneName[50];int price;int…
Q: 7.5 LAB: Name format Many documents use a specific format for a person's name. Write a program…
A: The error is generated because the program is given only one input and then expects the output. But…
Q: #include #include #include double area (double r); // this starts the definition for the area…
A: #include <iostream> #include <math.h> #include <cstdlib> double area (double r);…
Q: Computer Science The program below uses a class, DomainAvailabilityTools, which includes a table of…
A: Answer: I have done code and also I have attached code.
Q: Function 4: Spell Correction _spellCorrection( string1, string2 ) Create a JavaScript function…
A: Given The answer is given below.
Q: Write a function find_Substring() that finds a substring into a string. Pass array s1 and s2 to this…
A: C-string: A string is a collection of characters in consecutive locations in an array. A c-string…
Q: Create a C++ program called FindDomainFromEmail. Declare an array arrEmail. Assign a number of email…
A: /*C++ program for FindDomainFromEmail which displays the list of emails based on user selected…
Q: Create a string variable containing your full name (with spaces) 2) print the string as shown below…
A: Program: #include<string>#include <iostream> using namespace std; //Function to print…
Q: comparesstring1to string2. It is a value returning function that returns a negative integer if…
A: Thestrcmp(string1,string2)function comparesstring1to string2. It is a value returning function that…
Q: Exercise 5: Change characters of a word Write a function named strsmall that transforms all letters…
A: Please refer below for your reference: Language used is C++: I have written the code in such a way…
Q: This is a program in C language. Help me debug this program. it has 3 errors. Please upload a…
A: Given program is a C++ program, not C program. Because iosteam, cout, cin all these are used in C++.…
Q: Create a program that: 1. Prompts the user to enter a string. 2. Use ANY method you'd like to remove…
A: Description –One function is_Vowel() is created to check for the vowels. In this function, an enum…
Q: #include #include #include #include using namespace std; class Movie { private:…
A: Q: Code the given problem
Q: #include #include #include #include using namespace std; class Movie { private: string…
A: Vectors are similar to arrays but dynamic in nature. In short, they are dynamic array that can…
Q: String Manipulation. a) Create three string variables: first, last, name b) Store your first name in…
A: Note: Programming language is missing in the question. So we will answer this program in C++…
Q: Using C/C++ programming language, solve the following problems. typedef structure { int phoneID;…
A: GIVEN: ' Using C/C++ programming language, solve the following problems. typedef structure { int…
Q: C++ Coding Write a program that asks a teacher to enter the student's and the grades received on…
A: C++ Coding Write a program that asks a teacher to enter the student's and the grades received on her…
1.
string color = "Yellow"; //What does this code do?
a. |
declares a structure |
|
b. |
calls a function |
|
c. |
creates a character array |
|
d. |
creates an object |
2.
The strcmp function returns ____________________.
a. |
0 if the two strings are equal |
|
b. |
a negative value if the first argument is alphabetically less than the second |
|
c. |
a positive value if the first argument is alphabetically greater than the second |
|
d. |
all of a through c are true |
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Create a C++ program called FindDomainFromEmail.Declare an array arrEmail.Assign a number of email addresses to the array as part of the declaration statement. Example:string arrEmail [5] = {"John.Smith@gmail.com", "Peter.Pan@iacfrica.co.za", "James.Dawson@mweb.co.za", "Lee.Morake@gmail.com","Mary.Grovan@mweb.co.za"}; Write a function called displayArr that will receive the array as a parameter and display a numbered list of the email addresses. Write a function called findClients that will receive the array as a parameter.Ask the user to enter the domain to find in the email addresses before the for loop.The domain is the name of the service provider e.g. mweb or gmail or iafrica, etc. Write code to find and display the email addresses that contain the domain that was entered.Example: If mweb was entered as the domain, the following list should be displayed with the example array: List of email addressesJames.Dawson@mweb.co.zaMary.Grovan@mweb.co.za In the main…Create a string variable containing your full name (with spaces) 2) print the string as shown below 3) Create a blank 5x10 character array 4) Create a function printArray() that will print every row and column of the array 5) Create a function getNextCharacter() that gets passed the name string and returns the next non-blank character. If you have reached the end of the string then continue at the beginning. You may need to use a global variable 6) Create a function fillArray() that will fill the 2 dimensional array with the letters of your name skipping blanks. Use the above getNextCharacter() function to fill the array with only the characters in your last name. 7) Print the entire array. 8) Request a row number to print and use a sentinal loop to make sure the row number is valid. If not then request a row number again 9) Create a function printIter() that prints only the passed row using iteration 10) Create a function printRecur() that prints only the passed row using recursion…C++ Create a class Student that contains three members: roll no, name and mark, and three functions. Write a first inputStudent() function to get data of student class. Write a second getMark() function that returns a student’s mark. Write a third display() function that displays a student’s data. In a main() function, you need to declare 40 students and get data of all students by using inputStudent() function. And also use a pointer array to keep all students by mark greater than 50 and display the searching data of each student in that pointer array (Use the access operator -> to access a pointer points to member functions of the Student class).
- This is a program in C language. Help me debug this program. it has 3 errors. Please upload a screenshot also that it is working thank you./* This porgram uses the gotoxy() function and textcolor() for better screen display */ #include <iostream>#include <conio.h>#include <stdlib.h>using namespace std;main(){ int NoItem,ItemNo,Qty,ctr,Row=5; float UPrice,TAmt,ATendered,Change,APaid=0; char ItemDesc[15],TempChar; system("Color 5");; system("Color 2"); gotoxy(25,1);cout<< "[***] RICHLY SUPERMARKET [***]"; gotoxy(31,2);cout<< "Ayala Avenue, Makati"; gotoxy(6,4);cout<< "Item No. Description Qty. Unit Price Total Amount"; gotoxy(5,22);cout<< "No. of Item(s) Bought => [ ]"; gotoxy(37,22);cout<< "Total Amount to be Paid => "; gotoxy(37,23);cout<< "Amount Customer Tendered => "; gotoxy(37,24);cout<< "Amount of Change => "; gotoxy(31,22);cin>> NoItem;…JAVA Programming Problem 5 – CharacterArray Write a program which will store the following string into a character array: 6901 Sudley Road Manassas VA Your program will display each original character, determine and display whether the character is a digit or a letter, and redisplay the character according to the directions below. Directions Create a class called CharacterArray. The scanner class is not required. Initialize the character array with the given string. Write a program which will accept an alpha numeric string at the keyboard. Store the string, of any length, into a character array, for example: RBDB Manassas Campus 6901 Sudley Road Manassas VA 20109 For each visible character: Display the original character Determine and display whether the character is a digit or a letter If the character is a lower case letter, redisplay the character in upper case If the character is a upper case letter, redisplay the character in lower case If the character is a digit, display it…write the psuedocode and drow the flowchart Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation.
- 9.Code please. In this exercise you will create a program that will be used in a digital library to format and sort journal entries based on the authors last name. Each entry has room to store only the last name of the author. Begin by removing the first name "Isaac" from the string variable journal_entry_1 by using the string function erase. Do not forget to also remove the whitespace so that the string variable journal_entry_1 will then contain the string "Newton" with no whitespaces. The journal entries should be sorted alphabetically based on the authors last name. For example, the last name "Brown" should come before the last name "Davis" Create an if statement so that if the last name contained within journal_entry_2 is alphabetically less than the last name contained within journal_entry_1, then the string values are swapped using the string function swap. You may use either of the comparison operators < > in the if statement but remember that following ASCII, "A" is…(Numerical) Write and test a function that returns the position of the largest and smallest values in an array of double-precision numbers.Create a class Student that contains three members: roll no, name and mark, and threefunctions. Write a first inputStudent() function to get data of student class. Write a secondgetMark() function that returns a student’s mark. Write a third display() function thatdisplays a student’s data. In a main() function, you need to declare 40 students and get dataof all students by using inputStudent() function. And also use a pointer array to keep allstudents by mark greater than 50 and display the searching data of each student in thatpointer array (Use the access operator -> to access a pointer points to member functions ofthe Student class)
- Exercise2: Thestrcmp(string1,string2)function comparesstring1to string2. It is a value returning function that returns a negative integer if string1 < string2, 0 if string1 == string2, and a positive integer if string1 > string2. Write a program that reads two names (last name first followed by a comma followed by the first name) and then prints them in alphabetical order. The two names should be stored in separate character arrays holding a maximum of 25 characters each. Use the strcmp() func- tion to make the comparison of the two names. Remember that 'a' < 'b', 'b' < 'c', etc. Be sure to include the proper header file to use strcmp(). Sample Run 1: Please input the first name Brown, George Please input the second name Adams, Sally The names are as follows: Adams, SallyBrown, George Sample Run 2: Please input the first name Brown, George Please input the second name Brown, George The names are as follows: Brown, GeorgeBrown, GeorgeThe names are the sameC++ Coding Write a program that asks a teacher to enter the student's name and the grades received on her quarterly exams. The datatype for the student's name could be a string and the four grades should be entered in an array of data types int. Test scores are on the base of 100. REMINDER: sum and cap CANNOT be integers. The main() functions describe the average function with the following title line: double avg( int grades[], int cap ) The program prints the student's name, her four grades, and her average grades The main() function also uses the following print function: void print( int grades[], int cap);C++ Coding Write a program that asks a teacher to enter the student's and the grades received on her quarterly exams. The datatype for the student's name could be a string and the four grades should be entered in an array of data types int. Test scores are on the base of 100. The main() functions describe the average function with the following title line: double avg( int grades[] , int cap ): The program prints the student's name, her four grades, and her average grades. The main() function also uses the following print function: void print( int grades[], int cap);