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
Elanso [62]
3 years ago
9

Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void

. It should look like this {5,10,8,9,1}
Computers and Technology
1 answer:
nikitadnepr [17]3 years ago
5 0

Answer:

void printarr(int nums[],int n)

{

   cout<<"{";//printing { before the elements.

   for(int i=0;i<n;i++) // iterating over the array.

   {

       cout<<nums[i];//printing the elements.

       if(i==n-1)//if last element then come out of the loop.

       break;

       cout<<",";//printing the comma.

   }

   cout<<"}"<<endl;//printing } at the end.

}

Output:-

5

1 2 3 4 5

{1,2,3,4,5}

Explanation:

I have created a function printarr of type void which prints the array elements in one line.I have used for loop to iterate over the array elements.Everything else is mentioned in the comments.

You might be interested in
The seven basic parts of a computer are
True [87]
Monitor, keyboard, CPU, mouse, and I believe the USB drive , DVD drive and hardware system
4 0
2 years ago
Read 2 more answers
What could be a summary sentence or phrase that captures your writing experience?
Natasha2012 [34]

<u>Answer:</u>

<em>A summary sentence should brief the whole content “what so ever the length of the original content” may be. </em>

For example, if you take a story, <em>moral will be the good example of summary. </em>One another example is when the teacher taught concept in the classroom, in the last few minutes of the class the teacher <em>would brief the whole into smaller points. </em>

Even nowadays, people go and visit movies only after seeing the review online. So once again the review is a small brief about the movie in one or two lines. <em>It should be crisp, use cherry-picked words, etc.</em>

3 0
3 years ago
How to set the maximum to 10? Java
hichkok12 [17]
Public int setLimit(parameter) {
if (parameter > 10) {
return 10;
} else {
return parameter;
}
}
6 0
3 years ago
The list below represents the contents of a computer's main memory. I've left every other byte blank. Assume that the letters at
inysia [295]

Answer:

3) A Single linked list is a sequence of elements in which every element has link to its next element in the sequence.

DATA LINK

DATA stores actual value , LINK stores address of next node

As per information given in question, letters at the even addresses are items in linked list and the odd addresses will be used as links.

Even Address Odd Address

12 (Stores 't') 13 (Used as link)

14 (Stores 'm') 15 (Used as link)

16 (Stores 'a') 17 (Used as link)

18 (Stores 'r') 19 (Used as link)

20 (Stores 's') 21 (Used as link)

Numbers represented by circle are addresses of respective nodes. Here Front or Head has address 16. Which represents the Head Node.

Following image represents the word "smart" with respective nodes and their addressing.

​

Numbers represented by circle are addresses of respective nodes.

The head pointer is: 20

7 0
3 years ago
Nonprocedural access to a database
777dan777 [17]

Answer:

Option D: All of above.

is the correct answer.

Explanation:

  • Non-procedural access is the feature of the database.
  • This means that when a database is created in a database management system (DBMS) using data definition language (DDL), it will be accessed every time using a data manipulation language (DML). The standard DML is SQL. SQL stands for Sequential Query Language.
  • This feature of database ultimately improves the software productivity.
  • Most of the tools of Database Management systems (DBMSs) support the non-procedural access.
  • This feature permits a user to submit queries to a database without knowing how to retrieve data.

i hope it will help you!

4 0
3 years ago
Other questions:
  • Complete the following:_____
    9·1 answer
  • How do you design video games
    5·1 answer
  • Create a file account.cpp containing a Bank Account Class.
    11·1 answer
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • Anybody know this question??
    8·1 answer
  • Please help!!! I am very confused about this question!
    10·1 answer
  • Only for study<br><br>Or open Meet and enter this code: bqa-ivfs-ach​
    11·2 answers
  • What is the suffix of hollow?
    7·1 answer
  • What does it mean "Be Proactive"?
    10·2 answers
  • What is software?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!