Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 2, Problem 20RQ
Which of the following compares two string variables named string1 and s tring2 to determine if their contents are equal?
- string1 = string2
- string1 == string2
- Equals.String(string1, string2)
- two of the above
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write a statement that defines a string variable called city that can hold a string of up to 20 characters.
String user_input is read from input.
If user_input starts with 'G', then output 'String starts with G'.
Otherwise, if all the characters in user_input are numbers, then output 'All numbers'.
If none of the above are true, output 'No condition fits'.
True or False When you pass the formatting string "C" or "c" to the ToString method, the number is returned formatted as currency.
Chapter 2 Solutions
Microsoft Visual C#
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Assume that you have two variables declared as int...Ch. 2 - Assume that you have a variable declared as...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Prob. 8RQCh. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...
Ch. 2 - Prob. 11RQCh. 2 - Which of the following is not a C# comparison...Ch. 2 - Prob. 13RQCh. 2 - Which of the following C# types cannot contain...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - When you perform arithmetic operations with...Ch. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Which of the following compares two string...Ch. 2 - What is the numeric value of each of the following...Ch. 2 - What is the value of each of the following Boolean...Ch. 2 - Choose the best data type for each of the...Ch. 2 - In this chapter, you learned that although a...Ch. 2 - Write a C# program named InchesTOCentmeters that...Ch. 2 - Prob. 6ECh. 2 - Write a C# program named ProjectedRaises that...Ch. 2 - Convert the ProjectedRaises class to an...Ch. 2 - Malcolm Movers charges a base rate of $200 per...Ch. 2 - Prob. 10ECh. 2 - Write a program named Eggs that declares four...Ch. 2 - Modify the Eggs program to create a new one named...Ch. 2 - Write a program named MakeChange that calculates...Ch. 2 - Write a program named Testslnteractive that...Ch. 2 - Write a program named FahrenheitToCelsius that...Ch. 2 - Prob. 16ECh. 2 - Prob. 17ECh. 2 - Pig Latin is a nonsense language. To create a word...Ch. 2 - Each of the following files in the Chapter.02...Ch. 2 - In Chapter 1, you created two programs to display...Ch. 2 - Prob. 2CP
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.Similar questions
- Given a String variable named brand that has been declared and initialized, write the statement needed to create a new integer variable named numChars that contains the number of characters in the String. int numChars =arrow_forwardFunction strlen() takes a string as an argument and returns the number of characters in the string, Which of the following is the correct answer to fill the above statement with it? Select one: a. Spaces are not included in the length calculation b. Null character is not included in the length calculation c. Numbers are not included in the length calculation d. Null character is included in the length calculationarrow_forwardAssume variable middle_initial has a one-letter string in it.If we also assume this letter is in lower case, which of the following expressions produces the equivalent upper case letter. Select one: a. chr(middle_initial) - 32 b. ord(middle_initial) + 32 c. chr(middle_initial) + 32 d. ord(middle_initial) - 32arrow_forward
- What does the following error message mean: SyntaxError: EOL when scanning string literal Select one: а. This error normally means that you used a string where a number was expected. b. O b. This error normally indicates that a string was missing a closing quote. О с This error normally means that you used the scan() function with a string when you should have used the split() function. O d. This error normally means that you have used an EOL command incorrectly.arrow_forwardWhich of the following options is rigth for the following declaration: string *x,y; Select one: a.y is a pointer to a string, x is a string b.x is a pointer to a string, y is a string c.none of the options d.both x and y are pointers to string typesarrow_forwardQ: People often forget closing parentheses when entering formulas. Write a program that asks the user to enter a formula and prints out whether the formula has the same number of opening and closing parentheses. Q: Write a program that asks the user to enter a word and prints out whether that word contains any vowels. Q: Write a program that asks the user to enter a string. The program should create a new string called new_string from the user’s string such that the second character is changed to an asterisk and three exclamation points are attached to the end of the string. Finally, print new_string. Typical output is shown below: Enter your string: Qbert Q*ert!!! Q: Write a program that asks the user to enter a string s and then converts s to lowercase, removes all the periods and commas from s, and prints the resulting string. Q: Write a program that asks the user to enter a word and determines whether the word is a palindrome or not. A palindrome is a word that reads the same…arrow_forward
- Your program will prompt the user for the following information: current population number of yearly births from the previous year number of yearly deaths from the previous year number of years into the future for your predictive value of the future population. You will then compute the following: birth rate death rate growth rate the predicted future population Assignment Notes: To allow the user to input the numeric data (such as current population) it is necessary to use the input function. The input function takes a string in parenthesis that prompts the user what to enter. The computer then waits until the user types a response, terminated by the user typing the Enter key. A string, as a sequence of characters, is returned to the variable on the lefthand side of the assignment statement. For example: currPopulation = input(“Enter the current US population”) The data in currPopulation is a string (because that is what the input statement does) but we need it to be a number…arrow_forwardIn C++arrow_forwardi. numberBig >= 2000 j. numberBig > numberMedium + numberSmall k. numberBig > numberMedium AND numberBig numberSmall m. numberBig 10 n. numberBig = 300 AND numberMedium = 10 OR numberSmall = 1 o. wordSmall > wordBig p. wordSmall > wordMediumarrow_forward
- Please help me! The program is able to accept 3 input scores from the user. The average of the 3 scores can also be obtained. How do I show thw highest score and the lowest score from the 3 input scores. strictly use this program below import csv# Define global variablesstudent_fields = [' Student No.', ' Name', ' Age', ' Email address']math = ['Math']physics = ['Physics']computer = ['Computer']average = ['Average']student_database = 'students.csv' def display_menu():print(" Welcome to Student Management System ")print("1. Add New Student")print("2. View Students")print("3. Search Student")print("4. Update Student")print("5. Delete Student")print("6. Quit") def add_student():print("Add Student Information")global student_fieldsglobal mathglobal physicsglobal computerglobal averageglobal student_database student_data = []for field in student_fields:value = input("Enter" + field + ": ")student_data.append(value)for m in math:m = int(input("Enter your math grade: "))student_data.append(m)…arrow_forwardWrite a statement that declares a string named city with value Chicago.arrow_forwardWrite an application that accepts three Strings from the user and displays them in alphabetical order without regard to case.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License