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
Mashcka [7]
2 years ago
7

Group of answer choices When declaring a variable, you also specify the type of its values. Variables cannot be assigned and dec

lared in the same statement. Variable names can be no more than 8 characters long. Variable names must contain at least one dollar sign.
Computers and Technology
1 answer:
olga nikolaevna [1]2 years ago
6 0

Complete Question:

Which of the following statement is true?

Group of answer choices.

A. When declaring a variable, you also specify the type of its values.

B. Variables cannot be assigned and declared in the same statement.

C. Variable names can be no more than 8 characters long.

D. Variable names must contain at least one dollar sign.

Answer:

A. When declaring a variable, you also specify the type of its values.

Explanation:

In Computer programming, a variable can be defined as a placeholder or container for holding a piece of information that can be modified or edited.

Basically, variable stores information which is passed from the location of the method call directly to the method that is called by the program.

For example, they can serve as a model for a function; when used as an input, such as for passing a value to a function and when used as an output, such as for retrieving a value from the same function. Therefore, when you create variables in a function, you can can set the values for their parameters.

For instance, to pass a class to a family of classes use the code;

\\parameter Name as Type (Keywords) = value;

\\procedure XorSwap (var a,b :integer) = "myvalue";

<em>Hence, the true and correct statement is that when declaring a variable, you also specify the type of its values such as integers, string, etc. </em>

You might be interested in
Put the following events from computer history in the order they happened:
kykrilka [37]
Show us a picture so we can answer
7 0
2 years ago
Consider the following class declaration: public class Square { private double sideLength; public double getArea() { return side
kipiarov [429]

Answer:

Here is the constructor:

public Square(double s) {  //constructor name is same as class name

sideLength = s;  } //s copied into sideLength field

Explanation:

The above constructor is a parameterized constructor which takes a double type variable s as argument. The name of constructor is same as the name of class.This constructor requires one parameters. This means that all declarations of Square objects must pass one argument to the Square() constructor as constructor Square() is called based on the number and types of the arguments passed and the argument passed should be one and of type double.

Here is where the constructor fits:

public class Square {

private double sideLength;

public Square(double s) {  

sideLength = s;  }

public double getArea() {

return sideLength * sideLength;}

public double getSideLength() {

return sideLength; } }

4 0
3 years ago
Someone help me
valkas [14]

The program is an illustration of loops.

Loops are used to perform repetitive and iterative operations.

The program in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This declares and initializes all variables

   string star = "*", blank = " ", temp;

   //The following iteration is repeated 8 times

   for (int i = 1; i <= 8; i++) {

       //The following iteration is repeated 8 times

       for (int j = 1; j <= 8; j++) {

           //This prints stars

           if (j % 2 != 0) {

               cout << star;

           }

           //This prints blanks

           else if (j % 2 == 0) {

               cout << blank;

           }

       }

       //This swaps the stars and the blanks

       temp = star;

       star = blank;

       blank = temp;

       //This prints a new line

       cout << endl;

   }

}

Read more about similar programs at:

brainly.com/question/16240864

5 0
2 years ago
Defining a hexadecimal number as in Problem 67, write the function int hexToDec( const int hexNum[]) to convert a four-digit hex
lyudmila [28]

Answer:

#include <stdio.h>

int hexToDec(const int hexNum[]){

   int result = 0, prod = 1;

   for(int i = 3;i>=0;i-=1){

       result += (prod*hexNum[i]);

       prod = prod * 16;

   }

   return result;

}

int main()

{

   int hexNum[4], i;

   char s[5], ch;

   printf("Enter hexa decimal value: ");

   scanf("%s",s);

   

   for(i = 0;i<4;i++){

       ch = s[i];

       if(ch>='0' && ch<='9'){

         hexNum[i] = ch-'0';

      }

      else if((ch>='a' && ch<='f') || (ch>='A' && ch<='F')){

         if(ch=='A' || ch=='a'){

            hexNum[i] = 10;

         }

         else if(ch=='B' || ch=='b'){

            hexNum[i] = 11;

         }

         else if(ch=='C' || ch=='c'){

            hexNum[i] = 12;

         }

         else if(ch=='D' || ch=='d'){

            hexNum[i] = 13;

         }

         else if(ch=='E' || ch=='e'){

            hexNum[i] = 14;

         }

         else{

            hexNum[i] = 15;

         }

      }

   }

   

   printf("%d",hexToDec(hexNum));

   return 0;

}

Explanation:

3 0
3 years ago
A(n) ____ circular reference occurs when a formula in a cell refers to another cell or cells that include a formula that refers
weeeeeb [17]
Indirect is the correct answer. 
8 0
3 years ago
Other questions:
  • To make sure that you do not get too tired when typing for long periods, how often should you get up and stretch? Every 15 minut
    9·1 answer
  • Only business writing requires an editing stage
    8·1 answer
  • How to know if somebody else is listening my conversations by cellphone?
    13·1 answer
  • What is output by the following?<br><br>print (type("95"))
    13·1 answer
  • While researching ideas for cutting energy costs is his company. Hector watches an online video in which a business expert says,
    6·2 answers
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • When the program generates or populates reports after getting the data and processinng,it is called
    9·1 answer
  • Can someone tell me? I have an assignment in C++: I have to do three codes please tell me should i do them in one project or in
    12·1 answer
  • Personal statements School leaver
    15·1 answer
  • 1:A presentation program which is developed by Microsoft
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!