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
Maurinko [17]
3 years ago
8

If the variable letter has been defined as a char variable, which of the following are not valid assignment statements to assign

letter w to the variable?
A) letter = w;
B) letter = 'w';

C) letter = "w";
Computers and Technology
1 answer:
Rudiy273 years ago
6 0

Answer:

The correct answer for the given question is option(A) and option(C) .

Explanation:

To declared any variable of character we using following syntax

char variable=' value';

char  letter='w';

In option(A)  their is no single quotes between character w .So this is not a valid assignment.

In option(C) their is double quotes between character w,no single quotes  between character w .So this is not a valid assignment.

In option(B) their is single quotes between character w .So this is a valid assignment.

So option(A) and option(C) are are not valid assignment statement.

You might be interested in
Which of the following is another type of brake system used in trucks
Doss [256]

answer is d hope it helps

4 0
3 years ago
A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single stateme
Allushta [10]

Answer:

<em>num_ones = amount_to_change % 5</em>

Explanation:

It is given that the cashier has to change the money in the maximum number of 5 dollar bills and remaining as $1 bills.

We have to write a single statement of code to assign the value to variable <em>num_ones </em>to find the value of $1 bills given <em>amount_to_change.</em>

<em />

Let us solve this by taking example:

If <em>amount_to_change </em>= $19

Then total number of $5 bills that can be given is 3. And amount that can be given as $5 bills is \bold{3 \times 5  = \$15}

So, the remaining amount i.e. $19 - $15 = $4 will be given as one dollar bills.

Out of these $19, 4 bills of $1 can be found using the <em>Modulus (%) operator.</em>

<em></em>

Modulus operator leaves the remainder i.e.

Output of <em>p % q </em>is the remainder when a number 'p' is divided by 'q'.

19 % 5 = 4

4 is the number of one dollar bills to be given.

So, single line of code for the number of one dollar bills can be written as:

<em>num_ones = amount_to_change % 5</em>

<em />

<em />

Let us try it for <em>amount_to_change  = </em>$30

We know that 6 number of $5 bills can be used to change the amount of $30 and no one dollar bill required.

<em>num_ones = 30 % 5 = </em>0 (because 30 is completely divisible by 5 so remainder is 0)

So, the correct statement is:

<em>num_ones = amount_to_change % 5</em>

4 0
4 years ago
What kind of digital certificate is typically used to ensure the authenticity of a web server to a client?
Sati [7]

Question with options:

What kind of digital certificate is typically used to ensure the authenticity of a web server to a client?

-private

-web server

-public web

-web client

Answer:

Web server digital certificate such as SSL(Secure Sockets Layer) Certificate

Explanation:

Digital certificates are certificates issued by trusted authorities (called Certificate Authority such as Encrypt Certificate Authority) and allow users determine the originality of a resource. With these certificates, users can confirm who the issuer of the certificate is and to whom the certificates are issued. They give users more confidence when using the web.

To determine the authenticity of a web server to a client, a web server digital certificate such as SSL certificate is used.

8 0
3 years ago
What are the differences betweenCONS, LIST, and APPEND?
den301095 [7]

Answer:

These all are constructors.

<u>CONS</u>

(CONS A B)

makes a pair like this:   (A . B)  

In other words, A is the CAR of the pair; B is the CDR of the pair.

For  example:

(CONS 4 5) ==> (4 . 5)

(CONS 4 '(5 6)) ==> (4 5 6)

[The pair (4 . (5 6)) is the same thing as (4 5 6)].

<u>APPEND  </u>

(APPEND A B)

makes a new list by replacing the final nil in A with the list B. A and  

B must be proper lists.

For example:

(APPEND '(4) '(5 6)) ==> (4 5 6)

This takes any amount of number and put in this order

<u>LIST  </u>

In this ,it will return a list whose elements are value of arguments in the order as it appeared in the LIST.It can take any amount of parameters

For example,

(LIST 4) ==> (4)

(LIST 4 5) ==> (4 5)

(LIST 4 5 '(6 7)) ==> (4 5 (6 7))

(LIST (+ 5 6)(* 5 6)) ==> (8 9)

6 0
4 years ago
Which of the following statements are true about gravity? Check all that
Maurinko [17]

Answer: E

Explanation: espero q te sirva

3 0
4 years ago
Read 2 more answers
Other questions:
  • What are the disadvantages of cloud computing?
    9·1 answer
  • An administrator has noticed that GPO containing new update settings has not yet applied to one of the computers on the network.
    5·1 answer
  • Conduct online research on web authentication and define what it is. Describe different authentication methods
    5·1 answer
  • Write a method called makeStars. The method receives an int parameter that is guaranteed not to be negative. The method returns
    6·1 answer
  • Some have argued that Unix/Linux systems reuse a small number of security features in many contexts across the system, while Win
    12·1 answer
  • An actual printout of computer data always satisfies the best evidence rule?
    12·1 answer
  • What is the way to discover requirments for software projects ?
    14·1 answer
  • Subjective Questions
    11·1 answer
  • a deque is a type of collection,but it is not automatically available when you open IDLE. What is missing that allows you to use
    14·2 answers
  • Write a python program to print the square of all numbers from 0 to 10.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!