1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
saw5 [17]
3 years ago
11

Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t

he outer quotes). In one of the variables use quoted string and in the other do not use it.
Computers and Technology
1 answer:
stich3 [128]3 years ago
8 0

Answer:

Let the two string type variables be var1 and var2.  The value stored in these two variables is : The "use" of quotations causes difficulties.

  • The variable which uses quoted string:

          string var1 = "The \"use\" of quotations causes difficulties.";  

  • The variable which does not use quoted string:

string var2 = "The " + '\u0022' + "use" + '\u0022' + " of quotations causes difficulties.";

  • Another way of assigning this value to the variable without using quoted string is to define a constant for the quotation marks:

const string quotation_mark = "\"";

string var2 = "The " + quotation_mark + "use" + quotation_mark + " of quotations causes difficulties.";

Explanation:

In order to print and view the output of the above statements WriteLine() method of the Console class can be used.

   Console.WriteLine(var1);

   Console.WriteLine(var2);

In the first statement escape sequence \" is used in order to print: The "use" of quotations causes difficulties. This escape sequence is used to insert two quotation marks in the string like that used in the beginning and end of the word use.

In the second statement '\u0022' is used as an alternative to the quoted string which is the Unicode character used for a quotation mark.

In the third statement a constant named  quotation_mark is defined for quotation mark and is then used at each side of the use word to display it in double quotations in the output.

You might be interested in
What are hard ware and software requirments in multimedia computer system
marishachu [46]

Answer:

Some hardware requirement: Monitor, keyboard, mouse, sound card, memory, processor, graphics display card. Some software requirement: Windows XP/Vista, Video for Windows, Quicktime.

Explanation:

BRAINLEST

4 0
3 years ago
Which behaviors demonstrate good netiquette? Check all that apply.
Andru [333]

Answer:

identifying yourself in a post or e-mail

writing short

respecting others privacy

Explanation:

3 0
3 years ago
PLS CAN ANYONE HELP ME
Nesterboy [21]

The exercise contains 15 questions. The solution is provided for each question.

Each question contains the necessary skills you need to learn.

I have added tips and required learning resources for each question, which helps you solve the exercise. When you complete each question, you get more familiar with a control structure, loops, string, and list.

Use Online Code Editor to solve exercise questions.

Also, try to solve the basic Python Quiz for beginners

Exercise 1: Given two integer numbers return their product. If the product is greater than 1000, then return their sum

Reference article for help:

Accept user input in Python

Calculate an Average in Python

Given 1:

number1 = 20

number2 = 30

Expected Output:

The result is 600

Given 2:

number1 = 40

number2 = 30

Expected Output:

The result is 70

Explanation:

4 0
2 years ago
This OS was created by a developer named Torvalds.
GREYUIT [131]
The answer to this problem is Linux
7 0
3 years ago
The type of code that uses eight bits for each character is ____.
Ksivusya [100]
It's Binary code simple as that its made of 8 1's and 0's
7 0
3 years ago
Other questions:
  • Write a program that displays the following pattern: ..\.\* .\.\*** \.\***** ******* \.\***** .\.\*** ..\.\* That is, seven line
    8·1 answer
  • What is the absolute pathname of the YUM configuration file? REMEMBER: An absolute pathname begins with a forward slash
    12·1 answer
  • OSHA requires training for employees on the hazards to which they will be exposed.
    12·2 answers
  • FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
    7·2 answers
  • Garry is a record executive who is building a data table to include in a presentation about one of his artists. The table is mea
    15·1 answer
  • Mobile computing has two major characteristics that differentiate it from other forms of computing. What are these two character
    8·1 answer
  • Which of the following is the MOST sensitive Personally Identifiable Information (PII) and should be shared cautiously and only
    8·1 answer
  • Write an if/else statement that assigns 0 to x when y is equal to 10; otherwise it should assign
    9·1 answer
  • Users of an access point share the transmission capacity of the access point. The throughput a user gets is called the ________.
    11·1 answer
  • Create a list with 5 numbers and find the smallest and largest number in the list and also the sum and product of the numbers in
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!