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
Tasya [4]
3 years ago
14

Which of the following are valid variable names? Select 2 options.

Computers and Technology
1 answer:
Zina [86]3 years ago
3 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct options to this question are C and D:

  • Fourth_number
  • Num4

Because these are the correct and valid variable names.

Other options are not correct because these variables names either start with a number or contains special character such as $ sign.

The invalid variables are A, B, and E while the valid variable declare are options C and D.

You might be interested in
Which of the following terms describes a product that is designed to meet humans’ physical and/or psychological needs?
Readme [11.4K]
I think it is psychological needs
8 0
3 years ago
Read 2 more answers
In this scenario, two friends are eating dinner at a restaurant. The bill comes in the amount of 47.28 dollars. The friends deci
pickupchik [31]

Answer:

The java program for the given scenario is as follows.

import java.util.*;

import java.lang.*;

public class Main

{

   //variables for bill and tip declared and initialized

   static double bill=47.28, tip=0.15;

   //variables for total bill and share declared

   static double total, share1;

public static void main(String[] args) {

    double total_tip= (bill*tip);

    //total bill computed

    total = bill + total_tip;

    //share of each friend computed

    share1 = total/2;

    System.out.printf("Each person needs to pay: $%.2f", share1);  

}

}

Explanation:

1. The variables to hold the bill and tip percent are declared as double and initialized with the given values.

static double bill=47.28, tip=0.15;

2. The variables to hold the values of total bill amount and total tip are declared as double.

3. All the variables are declared outside main() and at class level, hence declared as static.

4. Inside main(), the values of total tip, total bill and share of each person are computed as shown.

double total_tip= (bill*tip);

total = bill + total_tip;

share1 = total/2;

5. The share of each person is displayed to the user. The value is displayed with only two decimal places which is assured by %.2f format modifier. The number of decimal places required can be changed by changing the number, i.e. 2. This format is used with printf() and not with println() method.

System.out.printf("Each person needs to pay: $%.2f", share1);  

6. The program is not designed to take any user input.

7. The program can be tested for any value of bill and tip percent.

8. The whole code is put inside a class since java is a purely object-oriented language.

9. Only variables can be declared outside method, the logic is put inside a method in a purely object-oriented language.

10. As shown, the logic is put inside the main() method and only variables are declared outside the method.

11. Due to simplicity, the program consists of only one class.

12. The output is attached.

5 0
4 years ago
Read 2 more answers
Each webpage is assigned a(n) ______, an address that identifies the location of the page on the Internet.
timofeeve [1]

Answer:

The answer is "URL".

Explanation:

The term URL is also known as the "Uniform-Resource-Locator", which is also known as the address of the website or internet file. To access this file we use to type its address in the web browser by using the "http:// or https://" protocol. It contains the domain name, with several other basic data to guide a visitor to a certain internet website called a web page.

5 0
3 years ago
what do you do if someone you really love reads your message and doesnt reply? do I text them again or just ignore it?
crimeas [40]
If you really love someone and you text them but they don't text you back. You let it go because they aren't interested. I am sorry for saying that, but it could also mean that they are doing something at the moment and can't text back. I say, give it a day and if they don't text back, don't bother texting back.

3 0
3 years ago
Suppose that a function dynamically allocates a block of memory with a local pointer variable p pointing to the allocated block.
Kaylis [27]

Answer:

The Pointer P becomes a dangling pointer.

Explanation:

int calculate(){

int *p = (int*)malloc(10);

*p = 10;

return p;

}

In this program, the scope of p is only with the calculate function block. Hence, once the compiler comes out of the function, it can no more access the pointer p or the memory location p is pointing to. To overcome the dangling pointer, we need to declare p as static, so that the scope of p is throughout the program.

6 0
4 years ago
Other questions:
  • Exp19_Excel_AppCapstone_Intro_Collection
    10·1 answer
  • Edmund wants to create a website for his university. He has created all the necessary content and now wants to style and format
    11·1 answer
  • 1. Please write the following code in Python 3.2. Please also show all outputs.Create a dictionary named letter_counts that cont
    14·1 answer
  • To add text to a slide when using presentation software, you need to add a text box. To add a text box, click the Text Box butto
    8·2 answers
  • The purpose of maintaining a network of digital forensics specialists is to develop a list of colleagues who specialize in areas
    7·2 answers
  • 1. Pasar los siguientes ejercicios a diagrama de bloque
    11·1 answer
  • Write a public static method named evens that takes in 1 argument int a, and returns a String containing all positive even numbe
    8·1 answer
  • How many mb are in a gb?
    8·1 answer
  • Which sql keyword is used to retrieve a minimum value from an attribute in a table
    7·2 answers
  • If we increase the sample rate of a device from 48khz to 96khz, what is the impact to the network?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!