Which header file has the functions scanf()? a. stdlib.h b. stdio.h c. string.h d. math.h
Q: What is the output of the program below? #include #include using namespace std; void…
A: PROGRAM CODE: #include <iostream>#include <string> using namespace std; void…
Q: Given the program below, fill in the blanks: #include #include using namespace std; int main() int…
A: Your complete program is given below as you required with an output.
Q: Assume the variables name1 and name2 reference two different String objects, containing different…
A: Answer: The code that displays the strings referenced by these variables in alphabetical order is as…
Q: Which is not the c++ header file a. math b. iostream c. string d. stdio
A: Explanation: a. math- this is a header in c++ b. iostream- this is a header in c++ c. string- this…
Q: Returns a lowercase version of a user-entered letter * @param kbd * @return lowercase version of…
A: In Java, Scanner class is used to accept input from user Scanner class has various methods like…
Q: Case four: I am having a glitch where it enter the college[0] and total_tuition [0] five times and…
A: Correction in Case 4: Changed case4 code : int sum=0; int len = sizeof(College)/sizeof(College[0]);…
Q: Write a program that allows the user to enter three separate strings: a city name, a state name, and…
A: Given data:-
Q: Which line in the following program contains the header for the showDub function? 1 #include 2…
A: A function header is a declaration of function. A function header tells the compiler about three…
Q: Create a list of 10 numbers. Iterate through the list and store the highest and second highest…
A: for num in mylist: if num>max1: max1 = numfor num in mylist: if num>max2 and num…
Q: Which of the data types has the size that is variable? a) int b) struct c) float d) double
A: Question. Which of the data types has the size that is variable? int struct float double
Q: Write a program that asks for a date in dd/mm/yyyy format and display the same date in the format dd…
A: Simple Date Format which is used to format and parse dates in required manner.
Q: What is the output of the following code? #include <iostream>#include <string> #include…
A: #include <iostream>#include <string> #include "BMI.h" using namespace std;int main()…
Q: What will the following Code segment print on the screen?
A: The output of the above java program will be :
Q: QUESTION 4 character. The function getline(cin, stringVar) gets all remaining text on the current…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. The…
Q: Create a menu of physics standard formula. Make a return type function (5). Also create a Header…
A: //save this file with the “.h” extension. Below is the illustration of the header file: //Here it…
Q: What will be the output if all necessary code is included (Header files and main function)? void…
A: Here in main() method we create a Object x which contain null Object x=null; Now we pass this…
Q: I have been having trouble with this assignment. Attached will ben the assignment guide lines and my…
A: compilation failed
Q: The output of the lines below is int myNum = 15; string MyNumber = "number";…
A: Lets see the solution.
Q: What will the following program segment display? const int UPPER = 8, LOWER = 2;int num1, num2, num3…
A: Given: What will the following program segment display? const int UPPER = 8, LOWER = 2;int num1,…
Q: I need a function that takes a string and returns initials such as Bob Burnett becoming B.B. string…
A: A C++ program takes the phrase as input and displays its acronym. the acronym is an abbreviated word…
Q: 9 Which header file has the functions scanf()? a. stdio.h b. string.h c. stdlib.h d.…
A: 9 Which header file has the functions scanf()? a. stdio.h b. string.h c. stdlib.h d.…
Q: Fix the errors and find the lowest marks entered by the user struct std{ string name; int reg_no;…
A: Given data is shown below: Fix the errors and find the lowest marks entered by the user struct…
Q: Write a program to generate a random number between 1 - 100, and then display which quartile the…
A: Program Instructions:Use the header files, constants, seed and random number generator given in the…
Q: QUESTION 1 Write a program that can request the size of pizza, quantity from the user and calculate…
A: In C, the if-else statement is used to carry out operations based on a set of conditions. If and…
Q: we can execute a saved function by writing the function name in the : figure window O work space O…
A: Figure window is used create plot in the separate window. That means the figure window is used to…
Q: Which kind of variables can hold several values and types at one time? A String B) List O Integer D…
A: Please refer to the following step for the complete solution to the problem above.
Q: 4- Determine the output of the following code after clicking the button Try it function…
A: Given code in the question <!DOCTYPE html><html><body> <button…
Q: Hi, I am having some trouble with my c++ homework question. I have provided my code for the question…
A: PROGRAM CODE: #include<iostream>using namespace std; class Student{ public:…
Q: In Python Write a program that reads a string from the user containing a date in the form…
A: Here I have used the datetime package and imported the datetime and date module from it. Now I have…
Q: Create a program called countVowels.py that has a function that takes in a string then prints the…
A: Algorithm / Steps: Function countVowels definition with input_string as parameter Printing the…
Q: The following two statements will generate two strings with the same content: std::string strl =…
A: Ans: False that The following two statements will generate two strings with the same content…
Q: Write a program that prompts the user to enter their full name into three string variables. Display…
A: # include <iostream># include <string>using namespace std;int main() {char…
Q: QUESTION 10 What is wrong with the following code? #include using namespace std; void displayString…
A: Question 10: There is no parameters passed inside the display string. So the program gives a error.
Q: Find errors in the following lines of code assuming included header files. Write correct form with…
A: syntax errors: The programming language has a convention to follow the rules of the programming…
Q: In a document file, write a program that will execute a string functions based on what the user…
A: The program uses a switch-case statement to implement different choices of string manipulation…
Q: If str is declared as: String str = "ABCDEFGHI"; What will be returned from…
A: Answer
Q: : vowelcap (str) n = len (str) strl = "" for i in range (n): if (str[i]=="a" or str[i]=="e" or…
A: The correct python program is: def vowelCap(str): n = len(str) str1 ="" for i in range(n):…
Q: Now three isn't going to the loop. How can I prompt the user to enter the college and city five…
A: Now three isn't going to the loop. How can I prompt the user to enter the college and city five…
Q: 2. Functions of Cinema Application: With these above files, your program output may be look like:…
A: It takes three parameters, one of which is a character pointer called str. If str is valid, it…
Q: Correct the code by using the global variable to move the calculations such as (downPayment =…
A: I am considering that all the other code is correct only the thing you needed is the adding code for…
Q: Which data type would be used to store a whole number that you plan to add to another number?
A: Data types are defined for each variable which are declared. Data type defines the type of value a…
Q: Given 4 numbers(passed in as parameters) write a function that returns the average of these numbers…
A: PROGRAM INTRODUCTION: Import the required libraries. Define the definition of the function to take…
Q: Find the output of the following program. Assuming all the desired header files are already…
A: #include <iostream> using namespace std; struct Dimensions { int x_cord, y_cord; }; void…
Q: Prompt the user for data points. Data points must be in this format: string, int. Store the…
A: Functions in python: The split(separator ) function splits the input string into a list of strings…
Q: 1- Define a variable to hold student name, ex: "john smith" 2- For each letter in your name print…
A: CODE : public class Count { public static void main(String[] args) {…
Q: Given strings str1 = "Hello" and str2 = "Goodbye ", what is the ending value of string str3? %3D…
A: Given that, str1= "Hello" str2= "Goodbye" The result of str3= str1+str2 is HelloGoodbye. Because in…
Q: What is wrong with the following code? #include using namespace std; void displayString (string);…
A: Function displyString(string) has return type of Void and it takes a String parameter. But when…
Q: Q3 - Which of the following converts a type to a string in C#? A-Toint64 B-ToSbyte C - ToSingle…
A: The Convert class has various static methods for conversion of data from one datatype to another…
Q: Many documents use a specific format for a person's name. Write a program whose input is: firstName…
A: This program can be done in a very easy way. Programming instruction: First, take the input from the…
Step by step
Solved in 2 steps
- Which of the following is true? String data can be stored in a field defined as numeric Numeric data can be stored in a string data type String data and numeric data can be stored in any of the string or numeric data types without limitation An advantage of storing numeric data as a string is that it makes it easier to sort and calculate means and other statistics The format for date date types in Alteryx is MM-DD-YYYY True FalseWhen a lot of changes are required in data, which one should be a preference to be used? String or StringBuffer?Trying to get the cin function to work in the menu without interfering with the design but having errors. What is the best to use the cin choice function that ask the user to make a choice inside the menu #include "stdafx.h"#include "stdafx.h"#include <iostream>#include <cstdlib>#include <ctime>#include <string>#include <vector>#include <cctype>#include <iterator>#include <algorithm>#include <cmath>#include "ConsoleApplication13.h" using namespace std; string donor_name;double donor_amount;int choice; int main(){cout << " \n\n ******************************************************" << endl;cout << " ******************************************************" << endl;cout << " ** **" << endl;cout << " ** **" << endl;cout << " ** 1. Add a contributor. **" << endl;cout << " ** 2. Search and update contributor. **" << endl;cout << " ** 3. Display all Donor…
- Which of the following reads a line of text from a sequential access file and assigns the line (excluding the newline character) to the strText variable? inFile.Read(strText) inFile.ReadLine(strText) strText = inFile.ReadLine strText = inFile.Read(line)What type of object is created by the OpenText method? a. File b. SequenceReader c. StreamWriter d. None of the above.Which of the following opens the employ.txt file and allows the computer to write new data to the end of the files existing data? a. outFile = I0.File.AddText("employ.txt") b. outFile = I0.File.AppendText("employ.txt") c. outFile = I0.File.InsertText("employ.txt") d. outFile = I0.File.WriteText("employ.txt")
- If the file to be opened exists, which method erases the file’s contents? AppendText CreateText InsertText OpenTextWhich of the following statements changes the contents of the strWord variable from “led” to “lead”? strWord = strWord.AddTo(2, "a") strWord = strWord.Insert(2, "a") strWord = strWord.Insert(3, "a") strWord = strWord.Into(3, "a"c)Explore 9. Scroll back to the top of the file and, directly below the statement that declares the timeLeft variable, insert a command to run the countdown() function every second. Store this timed command in a variable named clockID.
- Which of the following can be used to clear the text contained in the lblTax control? lblTax = String.Empty lblTax.Text = String.Empty lblTax.ClearText lblTax.Text.ClearYou can replace the text …A. Ctrl+HB. Ctrl+RC. Replace from the edit menuD. Both A and Ccan you make and HTML file for this code please function validate() { var x = document.getElementById("email"); //Taking the value entered in input tag in the HTML file email = x.value; //taking the value if ( // if these satments do not match below email.includes("@") && (email.includes("gmal.com") || email.includes("outlook.com") || email.includes("yahoo.com")) ) { document.getElementById("result").innerHTML = "Email is valid"; //Printing the result of validation on HTML page } else { // then print else document.getElementById("result").innerHTML = "Email is not valid"; }} // works