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
Prepare a document to list down at least 10 features/operations (on process and thread) you can do using Process Explorer.
leonid [27]

Answer:

The operations that can be carried out using process explorer include but are not limited to:

Explanation:

  1. Killing a Process Tree
  2. Ending or terminating a process
  3. Suspending a process
  4. Examining which process has locked a file
  5. Manually detecting a virus
  6. Unhiding a process. This can help to callup the window for a process that is not visible under normal explorer activities
  7. Monitor CPU usage
  8. setting the priority of a process
  9. changing a service process's access security
  10. Monitoring Graphics Processing Unit

Cheers

6 0
2 years ago
Write a program that reads three whole numbers and displays the average of the three number. Sample Run #: java Average3 Interac
Maksim231197 [3]

Answer:

The program to this question as follows:

Program:

import java.util.*; //import package

class Average //defining class Average

{

public static void main(String[] args) //defining main method

{

int a1,b2,c3;//defining integer variable

float avg; //defining float variable

Scanner obz=new Scanner(System.in); //creating scanner class object

System.out.print("input first number: "); //print message

a1=obz.nextInt(); //input value by user

System.out.print("input second number: "); //print message

b2=obz.nextInt(); //input value by user

System.out.print("input third number: "); //print message

c3=obz.nextInt(); //input value by user

avg=a1+b2+c3/3; //calculating average

System.out.print("The average of "+a1+","+b2+",and "+ c3+"="+ avg);//print value    

}

}

Output:

input first number: 8

input second number: 10

input third number: 18

The average of 8,10,and 18=24.0

Explanation:

In the above code, a class "Average" is defined inside this class the main function is declared in this method three integer variable "a1, b2, and a3" is declared, which input the value from the user side. in this method, a float variable avg is defined that calculates its average value.

  • In the next step, a scanner class object is created, that uses the above integer variable values.  
  • In the "avg" variable add all integer variables then divide its value by 3. At the print, method is used that prints avg variable value.
4 0
3 years ago
Which of the following is a windows that allows you to temporarily store text
musickatia [10]
There are no answer choices listed so I don't have anything to choose from so i'm just going to go with what I know/think. Just from reading the question I think it may be the "notepad." If it is not the notepad then it may be the clipboard.

Sorry if this doesn't help you very much, but there were no answer choices. 
7 0
2 years ago
What type of loop structure repeats the code based on the value of a boolean expression?.
mixas84 [53]

Answer:

Condition-controlled loop

Explanation:

be happy

8 0
2 years ago
How long will my chromebook last if it is at 30 percent
Marta_Voda [28]

Answer:

You can see an estimated battery life time.

Explanation:

To see it simply put your mouse over the battery icon, don't click it and it should give you the life it has left in hours:minutes format.

5 0
3 years ago
Other questions:
  • Using a database of precomputed hashes from sequentially calculated passwords called a(n) __________, an attacker can simply loo
    14·1 answer
  • Harvey is creating a presentation for his school project. He wants to have the same look on all the slides of his presentation.
    7·1 answer
  • A(n) _____ is similar to a virus, except that it is an independent program that can be spread across computer networks without b
    11·1 answer
  • If you are working on a document and want to have Word automatically save the document every minute, what steps should you use t
    13·1 answer
  • Which is an example of a zero-point perspective?
    11·1 answer
  • Which of the following could be defined as a general-purpose computing device that enables workers to create, manage, store, sea
    12·1 answer
  • The process known as "bitmapping" is defined as information in _____. PLEASE HELP FAST
    11·1 answer
  • No production Web application, whether it resides inside or outside of the firewall, should be implemented without:
    6·1 answer
  • I NEED HELP QUICK
    9·1 answer
  • How is binary used in pixels and in sound?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!