answer.
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
Brilliant_brown [7]
2 years ago
7

Return 1 if ptr points to an element within the specified intArray, 0 otherwise.

Computers and Technology
1 answer:
Paladinen [302]2 years ago
4 0

Answer:

int withinArray(int * intArray, int size, int * ptr) {

      if(ptr == NULL) // if ptr == NULL return 0

            return 0;

      // if end of intArr is reached

      if(size == 0)

          return 0; // element not found

  else  

          {

            if(*(intArray+size-1) == *(ptr)) // check if (size-1)th element is equal to ptr

                   return 1; // return 1

            return withinArray(intArray, size-1,ptr); // recursively call the function with size-1 elements

         }

}

Explanation:

Above is the completion of the program.

You might be interested in
#Write a function called is_composite. is_composite should #take as input one integer. It should return True if the #integer is
malfutka [58]

Answer:

// A optimized school method based C++ program to check  

// if a number is composite.  

#include <bits/stdc++.h>  

using namespace std;  

bool isComposite(int n)  

{  

// Corner cases  

if (n <= 1) return false;  

if (n <= 3) return false;  

// This is checked so that we can skip  

// middle five numbers in below loop  

if (n%2 == 0 || n%3 == 0) return true;  

for (int i=5; i*i<=n; i=i+6)  

 if (n%i == 0 || n%(i+2) == 0)  

 return true;  

return false;  

}  

// Driver Program to test above function  

int main()  

{  

isComposite(11)? cout << " true\n": cout << " false\n";  

isComposite(15)? cout << " true\n": cout << " false\n";  

return 0;  

}

Explanation:

3 0
2 years ago
To adjust the height of cells, position the pointer over one of the dividing lines between cells. When the pointer changes to th
Sergio [31]

Answer:

double arrow shape

Explanation:

To adjust the height of the cells

1. We have to position the mouse pointer over one of the column line or the one of the row line.

2. As we place the pointer between the dividing lines, the cursor of the mouse pointer change from singe bold arrow to double arrow symbol.

3.Now press or click the left mouse button and drag the dividing lines of the   cells to the desired position to have the required width or height of the cell.

5 0
2 years ago
Cardinality ratios often dictate the detailed design of a database. The cardinality ratio depends on the real-world meaning of t
Otrada [13]

Solution :

ENTITY 1               CARDINALITY RATIO                                     ENTITY 2

1. Student                        1 to many                                     Social security card

                      A student may have more than one          

                     social security card (legally with the

                      same unique social security number),

                     and every social security number belongs

                   to a unique.

2. Student                   Many to Many                                    Teacher

                    Generally students are taught by many

                    teachers and a teacher teaches many students.

3.ClassRoom               Many to Many                                   Wall

                      Do not forget that the wall is usually

                      shared by adjacent rooms.

4. Country                 1 to 1                                             Current President

                       Assuming a normal country under normal

                       circumstances having one president at a

                      time.

5. Course               Many to Many                               TextBook

                        A course may have many textbooks and

                       text book may be prescribed for different

                      courses.

6. Item                             Many to Many                           Order

                        Assuming the same item can appear

                         in different orders.

7. Student                       Many to Many                          Class

                        One student may take several classes.

                        Every class usually has several students.

8. Class                                 Many to 1                             Instructor

                       Assuming that every class has a unique

                        instructor. In case instructors were allowed

                        to team teach, this will be many-many.

9. Instructor                  1 to 1                                             Office

                       Assuming every instructor has only one

                      office and it is not shared. In case of offices

                     shared by 2 instructors, the relationship

                    will be 2-1. Conversely, if any instructor has a joint

                    appointment and offices in both departments,

                    then the relationship will be 1-2. In a very general

                  case, it may be many-many.

10. E-bay Auction item             1-Many                           E-bay bid

                        1 item has many bids and a bid is unique

                        to an item.

7 0
2 years ago
Dante has a worksheet shared with multiple users. He would like the ability to approve or reject changes that are made. Which fe
Gemiola [76]

Answer:

Data Consolidation.

Explanation:

7 0
2 years ago
15 points. Please give an actual answer and not some random thing. this is not just free points. Correct answer will receive bra
trapecia [35]

Answer:

i think its b

Explanation:

i did the test and got it right

7 0
2 years ago
Read 2 more answers
Other questions:
  • Enter a formula in cell G5 that calculates the difference between the attendance totals for 2018 and 2017. Copy the formula to t
    6·1 answer
  • Danilo is planning the art to include in a business proposal his team is preparing. For which of the following items should Dani
    7·2 answers
  • In a graphical user interface, which is a small symbol on the screen whose location and shape changes as a user moves a pointing
    10·1 answer
  • If a stadium pays $20,000 for labor and $13,000 for parking, what is the stadium's profit margin if the game generates $206,000
    7·2 answers
  • QUESTION 9 of 10: Bob charged $200 for a plane ticket last month. When he received his statement, he saw that he could pay the m
    12·2 answers
  • ________ is a free online service that enables a user to contact a cell phone number to hear who answers the telephone without i
    5·1 answer
  • In Java please.
    12·1 answer
  • When you add a zero to the right of a decimal number, it multiplies its value by 10 (For example, "15" becomes "150"). What simi
    10·1 answer
  • Which of the following is not a characteristic of a good value log entry
    15·1 answer
  • A retailer is able to track which products draw the most attention from its customers through the use of 5g-enabled motion senso
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!