In C++, which of the following libraries need to be included in order to deal with files? A #include #include (c) #include D) #include B.
Q: make a program in c++ which has a class named Student. The class should have appropriate data…
A: Given : make a program in c++ which has a class named Student. The class should have appropriate…
Q: 6- How to make a C++ function work with multiple data types? C++ 7- Every class has a default copy…
A: Make use of multiple data type in C++ functions As per our policies we will answer only 1st…
Q: o you mean by Dangling Pointer Variable in C Programming?
A: Dangling pointers : Dangling points in computer programming are pointers to a removed memory…
Q: Look at the code below and use the following comments to indicate the scope of the static variables…
A: Scope of variables and functions: Scope of variables and functions are an identifier, that…
Q: This lab will explore how to define a new C++ data type and also how to combine multiple C++ files…
A: Source Code: 1. printMeFirst.h For copy #include<iostream>using namespace std; void…
Q: In C++ please and in a manner I can copy and paste the code. Thanks You are to create a class…
A: //-------------- animal.h ------------#ifndef __ANIMAL_H#define…
Q: What is a Namespace? What does the line of code “using namespace std;” do? Where should this line of…
A: A namespace is a declarative region that provides a scope to the identifiers (names of the types,…
Q: parameter list can also contain the data type of the output of function : true/false a function…
A: As per our company guidelines, we are not supposed to answer more than three subparts of question…
Q: create a file in c++. In this lab, you will replace the existing functions with more flexible ones,…
A: Program Instructions:Define the necessary constants and header files.Use displayMessage() function…
Q: QUESTION 3 Suppose the following declarations appear in the mainfunction of a C++ program: string…
A: ANS -- 3:- Correct option -- 1. void approvedFunds(string courseP, string nameP, string & dateP,…
Q: Write a C++ program that stores data of students in a struct. It should store student's ID,…
A: The C++ program : #include <iostream>using namespace std;// student structurestruct student{…
Q: 1- What does the following lines of code do? A=[2 3 1 5 8 96 7 11 41; ind=find (A>8I A<3); 2- If the…
A:
Q: in C++ what does "Char" stand for as a data type? aswell as system("cls") what purpose does this…
A: Let's discuss both: "Char" In c++ "char" is used to declare the character type variable, the…
Q: Choose the correct option(s). There may be more than one correct option. 1. Structuring large…
A: 1. Structuring large programs may involve separation of function prototypes and definitions. 2.…
Q: When pointers are used parameters of a function, which of the following parameter passing methods is…
A: Passing information from calling function (Method) to the called function (method) is known as…
Q: hat exactly is meant by the term "pointer variable"? What is the pur
A: Introduction: Below the describe means of "pointer variable" and the the purpose of it
Q: USE ONLY SHELL SCRIPTING NOT OTHER LANGUAGES. AND MATCH OUTPUT AS IT IS .…
A: Here I have created a function to find the power of a to b. In this function, I have used a…
Q: FOR C++, PLEASE SEND THE CODE IN 30 MINUTES!!! PLEASE ANSWER THIS QUESTION IN THE GIVEN CODE Write…
A: Everything is mentioned in the comments make sure you check them for understanding…
Q: Identify the variables that would be available for assignment at BODY OF SUB1 (give the. name and…
A: Python is the most commonly used programming language and it is most popular among programmers.…
Q: This laboratory work covers the following concepts in C++ programming language: - the string class…
A: Based on C++
Q: In The Zen of Python, one of the lines states, "Namespaces are one honking great idea -- let's do…
A: Actually, python is a easiest programming language. It is a platform independent.
Q: Lab9: Structure & Makefile CS-102 2020 Fall Semester This lab will explore how to define a new C++…
A: CODE: printMeFirst.h For copy #include<iostream>using namespace std; void…
Q: What is void pointer? Give Example code ?
A: As you have not specified in which language you want the code, therefore the example code in the…
Q: This lab will explore how to define a new C++ data type and also how to combine multiple C++ files…
A: Actually, program is an executable software that runs on a computer.
Q: 6- The advantage of a SWITCH over an ELSE-IF statement is: A) A default condition can be used in…
A: The main advantage of the switch is: Provision of default condition. Easy to interpret. Different…
Q: 4- The reasons we use functions in C++ are. 5- When de we need to use protected keyword in C++…
A: Answer: We need to write some point regarding C++ Programming language so we have discussed in brief…
Q: C++, PLEASE SEND THE CODE IN 30 MINUTES!!! PLEASE ANSWER THIS QUESTION IN THE GIVEN CODE Write a…
A: We need to define the 3 functions as per the given description.
Q: You are required to make changes in the below programs and introduce the use of compaction where…
A: The required code is: #include<stdio.h>#include<conio.h> #define max 20void main(){int…
Q: A pointer variable is what? Then what? A dynamic array is a What's the deal with dynamic arrays and…
A: A pointer is a type of programming object used to hold addresses rather than values. A pointer…
Q: What is displayed when the following program is run?def main():try:f()print("After the function…
A: def main():try:f()print("After the function call")except IndexError:print("Index out of…
Q: I need complete explanation of c++ code line by line. Need Explanation of all lines of code what is…
A: Introduction of the Program: The C++ program displays the concept of ATM deposit and withdraw and to…
Q: This lab will explore how to define a new C++ data type and also how to combine multiple C++ files…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program that will read 5 mobile’s information from the user and save it in a file named…
A: void My5Phones(TPhoneDB phoneDB) { int iLoop=0; phoneDB->count=phoneDB->phoneSeqNum=5;…
Q: FileAttributes.c 1. Create a new C source code file named FileAttributes.c preprocessor 2.…
A: FileAttributes.c 1. Create a new C source code file named FileAttributes.c preprocessor…
Q: 1. Write a very simple program that: 1. Has a main function (all C executables have one). 2. Has two…
A: Due to bartleby guidelines i can only answer one question.please repost other parts as a separate…
Q: Which header file is required in C++ to use OOP? 2. Which feature allows open recursion?
A: Question 1. Which header file is required in C++ to use OOP? Answer 1. OOP can be used without…
Q: 2. Write a C program that reads a text file into an array of character (read as a string) and…
A: C Code #include <stdio.h> // include library #include <stdlib.h>int main(){ //…
Q: Identify the variables that would be available for reference at BODY OF SUB2 (give the. name and the…
A: Answer: w with binding created in 130
Q: In C++ What is wrong with the following code? int badArray[10]; badArray[10] = 2;
A: An array is defined as the collection of objects that are stored in the rows and columns. Advantages…
Q: ABC Bank needs to store the information of all the users. For a user, the information that the bank…
A: #include…
Q: Write a program in c++ opp The program must be included the following topics together In the same…
A: Step 1:- Program Approach:- 1.Declare the class ClassA1 and class ClassB1.ClassB1 is the friend…
Q: (4) Shown below are several variable declarations in C. There are comments indicating what each…
A: Please upvote me Please. I need it badly. Please. 1. uint32_t *PIOBase = (uint32_t *) 0x8675309;…
Q: Give solution in C ++ Language with secreenshoot of source code. Part 01 In this task, you need to…
A: Since multiple questions have been posted at a single request, we will answer first question. If you…
Q: tinclude using namespace std; void run1b(int&, int, int); int run2b((); int x=2; int main(){ int x,…
A: Explanation: initially read the value of x is 2. Take the y value is 1 and z value is 1. next call…
Q: Strictly Use ubuntu terminal only else I will report and dislike. Don't use any other c++…
A: Summary:Stack is a Last in First Out (LIFO) data structure in which insertion and deletion takes…
Q: Write a function named “hasHelpOption”that accepts argc and argv (same data typesof command line…
A: bool hasHelpOption(int argc,char **argv){ for(int i=0;i<argc;++i) {…
Q: In java create a function that writes student name surname and id to a text file and call the…
A: Required: In java create a function that writes student name surname and id to a text file and call…
Step by step
Solved in 2 steps
- Write a menu driven C++ program to do the following: 1. Read Employees information from a data file: Name, Hrs work, rate of pay 2. Write the following data to an output text file. Name, Hrs work, rate of pay and Gross pay and net pay (tax 21%) 3. Print employees checks with net pay. Must use Classes, Functions, Advance Files IO, pointers, arrays and C++ STL.PLEASE READ MY NOTE FIRST. Note: The following are the contents of a flex file that will be used to implement a lexical analyzer for a subset of the C programming language. I cannot understand anything in the code given below, so I need your help. I need you to explain every section of the code to me step-by-step in detail. At the end, please summarize what the code is all about and how it is functioning. Here's the code from the Flex file: %option noyywrap %{ #include<bits/stdc++.h> using namespace std; ofstream yyoutlog; //output filestream for log file string loglist = ""; //list of tokens along with line numbers // define necessary c++ variables and functions here (if any) int lines = 1; %} /* Regular Definitions */ delim [ \t\v\r] /* write regular expressions for whitespace and newline */ ws newline letter_ [A-Za-z_] digit [0-9] /* write regular expressions for id, float and integers */ id %% {ws} { /* ignore whitespace */ } {newline} {…Write a Haskell program copyIo.hs which has two command line arguments called file1 andfile2. Copy file1 to file2, and give an error message is file1 does not exist or if file2 does exist.
- ANSWER IN C PROGRAM- Consider the following structure definition and solve the following problems- typedef struct {int phoneID; // unique ID will start from 1 up to N.char phoneName[50];int price;int ramMemory;float cpuSpeed;int gpuMemory;char userName[50];int userPhoneNo;char userCountry[50];} SmartPhoneType; 1. Write a program that will read 5 mobile’s information from the user and save it in a file named“mobileInfo.txt”.ANSWER IN C PROGRAM- Consider the following structure definition and solve the following problems- typedef struct {int phoneID; // unique ID will start from 1 up to N.char phoneName[50];int price;int ramMemory;float cpuSpeed;int gpuMemory;char userName[50];int userPhoneNo;char userCountry[50];} SmartPhoneType; 1. Write a program that will read 5 mobile’s information from the user and save it in a file named“mobileInfo.txt”. 2. Write a function that will print all the information of a specific smart phone. Use the prototype -void printPhoneInfo(SmartPhoneType phoneType); 3. Print all the information of the phone using the function mentioned in the Question 2 which hasthe highest price. Use the prototype -void getHighestPricePhone ( SmartPhoneType mobileList[], int size, SmartPhoneType*highestPricePhone); 4. Write a function that will find all the devices from a specific country and print the informationusing the function mentioned in the Question 2. Use the prototype -void…I need complete explanation of c++ code line by line. Need Explanation of all lines of code what is happening in this code where the data is stored.? Code #include <iostream>#include <iomanip>#include <time.h>#include <fstream>#include <conio.h>#include <string.h>#include <stdlib.h>using namespace std;class Bank {public:};class ATMAccountHolders:public Bank{string accountHolders;string accountHoldersAddress, branch;int accountNumber;double startBalance;double accountBalance; double amount;int count;public:void deposit();void withdraw();void accountExit();ATMAccountHolders(){accountNumber = 7787;accountHolders = " Ammad Naseer";accountHoldersAddress = " House no.112";startBalance = 6000.00;accountBalance = 6000.00;branch = " Islamabad";amount = 20000; }}; void ATMAccountHolders::deposit(){system("cls"); cout<<" ATM ACCOUNT DEPOSIT SYSTEM ";cout<<"\n\nThe Names of the Account Holders are…
- In C++ please and in a manner I can copy and paste the code. Thanks You are to create a class called Horse. You should create the definition of the class Horse in a file horse.h and the functions for Horse in horse.cpp. You will also create a main program to be housed in horsemain.cpp. A Horse will have attributes of Breed (string) Weight (float) Name (string) Gender (‘m’ or ‘f’) Spayed or neutered (yes/no) Registration ID (alphanumeric like HZ123X) Color description (this could be more than a single word) Other comments (also more than a single word) A Horse will have the following methods Accessors for all attributes Mutators for all attributes A default constructor that sets all data elements to 0 or blank text as appropriate A fully specified constructor that allows defining values for all attributes A printinfo method that will display all the info for a horse in a logical and well formatted way including labels for each of the attribute fields horsemain.cpp should…WAP to read the class object of student info such as name, age and rollno from the keyboard and to store them on a specified file using read() and write() functions Again the same file is opened for reading and displaying the contents of the file on the screen. File Handling In C++Please use strtol and strtod. Please have the int main function first as well and write in C++. Develop a C++ program that reads an unsigned number in some base and outputs theequivalent value in a target base. The input file providing these values will be organized toallow for comment lines and blank lines along with data lines. Use only a single source file so Ican more easily script the downloading and compiling of your submissions.Your program must require a single command line argument, the name of an input file. Thisinput file will consist of any number of lines, each falling into one of three varieties:1. Comment - These lines always start with an at-symbol ('@') and should be completelyignored.2. Blank line - Used to visually organize the input file and should be completely ignored.3. Data line - These are the ones your program will process and are described below.Data lines will all have exactly 3 items separated by a single space character and end with anewline:1. an input…
- Hello. I'm trying to make a C++ program practices with classes and OOP with dates, using three files: main.cpp, Date.cpp, and Date.h. I'm getting errors in main.pp for undefined references and in Date.cpp. there is alse an error for undefined reference Requirements Date.h will contain the class declaration. The following is required in the class declaration: The private attributes are the month, day, and year. The public member functions are PrintDate, SetDate, and NextDate The default constructor should initialize all data to the value 0. NextDate should still return a new Date object with the next day's information. This function needs to be completed (For this, just assume Feb has 29 days all the time even though it is not true.) Date.cpp will contain the implementation of all member functions and the constructor main.cpp* will need to be updated to use the member functions. Example: SetDate(today,2,13,2016); // today.month = 2; // today.day = 13; //…6. If the starting address location changes, in which of the following cases, the program has to be recompiled? a. Execution time binding. b. Load time binding. c. Both compile and load time bindings. d. Compile time bindingHASKELL Please submit a single Haskell file • Please put comments in your code to show which question you are answering with each piece ofcode. • You may create auxiliary functions if you like. You may use library functions from Haskell’sstandard library. • Please limit your line lengths to 100 characters max. Please use the following two data types which you can copy-and-paste into your code. data Action = Rock | Paper | Scissors deriving (Eq, Show)data Outcome = Player1Win | Player2Win | Draw deriving Show Action represents a player’s chosen action and Outcome represents the outcome of playing a game. TASK Define a function check :: Action -> Action -> Outcome which calculates the outcome of a game where the first argument is the action of player 1 and the second argument is the action ofplayer 2.For example, check Rock Paper = Player2Win and check Paper Paper = Draw. Define a function parse :: String -> Maybe Action which will be used to parse user input for the choice…