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
Sladkaya [172]
3 years ago
15

Assume that name has been declared suitably for storing names (like "Amy", "Fritz" and "Moustafa"). Assume also that stdin is a

variable that references a Scanner object associated with standard input. Write some code that reads a value into name then prints the message "Greetings, NAMEVALUE!!!" on a line by itself where NAMEVALUE is replaced the value that was read into name. For example, if your code read in "Hassan" it would print out "Greetings, Hassan!!!" on a line by itself.
Computers and Technology
1 answer:
aniked [119]3 years ago
3 0

Answer:

void main(){

string name;

printf("Enter Name\n");

stdin("%s",&name);

Printf("\nGreetings %s",name);

}

Explanation:

Here scanf is represented by stdin and we are using that scanner object to read the string value from user.The value which we read are printed in a new line using printf .The format specifier %s in printf is replaced by name variable

You might be interested in
Careful driving requires appropriate reaction time, both simple and complex. Braking and then shifting gears, followed by signal
QveST [7]
The correct answer is complex.
There are two types of reaction times when it comes to driving - simple and complex. Simple reaction time refers to your action after receiving some sort of a stimulus - when you see the red light, you are supposed to break. When it comes to complex reaction time, however, it has to do with your assessment of the situation, and realization what it is you have to do in order to avoid an accident, for example. 
4 0
3 years ago
Read 2 more answers
Assume the int variables i, lo, hi, and result have been declared and that lo and hi have been initialized. Write a for loop tha
IRISSAK [1]

Answer:

result=0;

for (i=lo ; i<=hi; i++){

result += i;

}

Explanation:

The question says result was declared but not initialized, so using result without initializing it to 0 would throw an error as result would be undefined and you can't add a number to undefined

Another way to do it to keep everything inside the loop would be

for (i=lo ; i<=hi; i++){

if (i==lo) result= 0;

result += i;

}

but this is impractical since it would add unnecesary operations in each cycle of the loop

4 0
3 years ago
2) State True or False. 1. Abacus is an electronic device. 2. ROM is read and writes memory of computer. 3. Header and footer ap
mr_godi [17]

Answer:

1 false

2 false

3 false

4  true

5 false

Explanation:

7 0
2 years ago
Read 2 more answers
Write a java program to read elements in an array from user and count total number of duplicate elements in array.
Anna11 [10]

Answer:

Explanation:

The following code is written in Java and is a function/method that takes in an int array as a parameter. The type of array can be changed. The function then creates a counter and loops through each element in the array comparing each one, whenever one element is found to be a duplicate it increases the counter by 1 and moves on to the next element in the array. Finally, it prints out the number of duplicates.

public static int countDuplicate (int[] arr) {

               int count = 0;

               for(int i = 0; i < arr.length; i++) {

                       for(int j = i + 1; j < arr.length; j++) {

                               if(arr[i] == arr[j])

                                       count++;

                       }

               }

               return count;

       }

8 0
3 years ago
Select the correct answer.
Anettt [7]

Answer:

D.extended-star topology

Explanation:

8 0
2 years ago
Other questions:
  • When you enter search keywords in the search box of file explorer and the onedrive option is selected?
    15·2 answers
  • Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of integer
    14·2 answers
  • To copy the formatting of selected text to another place in the document use _____.
    14·1 answer
  • In regard to protective actions for explosive devices, the area where the blast originates is referred to as ___________ perimet
    8·1 answer
  • _____ can render data useless to unauthorized users who might have violated some of the database security layers.
    7·1 answer
  • You are system administrator with hundreds of host workstations to manage and maintain. You need to enable hosts on your network
    14·1 answer
  • Write your own printArray() function found in Processing for the Arduino. For simplicity, you can limit printArray() to integer
    7·1 answer
  • An ALGORITHM IS?<br> PLEASE HELP
    14·1 answer
  • Interviews should never feel like an_________Instead, they should feel like a________
    9·1 answer
  • Describe all the steps a router goes through while deciding where to send the a packet. Explain why a router would choose one ro
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!