Question

In C

An array ints of integers has already been declared and initialized. A function printint has been defined with the following

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Answer:
void printint(int *arr){
    int* p;
    for(p = arr; *p; p++){
        printf("%d ",*p);
    }
}
Add a comment
Know the answer?
Add Answer to:
In C An array ints of integers has already been declared and initialized. A function printint...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • the coding language is in c++ An array named testScores has already been declared. -size= 5...

    the coding language is in c++ An array named testScores has already been declared. -size= 5 -data type = float - the array has already been initialized these values: 77, 88.5, 90, 93, 71.5 -Write one statement to declare a pointer named: ptr - in the same statement, assign the address to the testScores array to the pointer -write one statement to output the memory address of the array element at testScores[0] -Write a for loop to output the values...

  • assume that input is an int array. the array is already declared and initialized wnd every...

    assume that input is an int array. the array is already declared and initialized wnd every element is assigned to an integer number. in addition assume that the array contains at least 1 element. write a code that contains one while loop abd no other loops to find both maximum and minimum numbers from input. then outout the maximum minus the minumum to the console window. (using java eclipse coding)

  • (C++) compute and return the sum of the ints contained in the Array table using RECURSION....

    (C++) compute and return the sum of the ints contained in the Array table using RECURSION. Start with the following function. int sum(node * head[]);    // // //This is the provided header file. //arr.h #include #include #include const int SIZE = 5;   //size of the array of head pointers struct node { int data; node * next; }; /* These functions are already written and can be called to test out your code */ void build(node * head[]); //supplied...

  • Write a C Program that inputs an array of integers from the user along-with the length...

    Write a C Program that inputs an array of integers from the user along-with the length of array. The program then prints out the array of integers in reverse. (You do not need to change (re-assign) the elements in the array, only print the array in reverse.) The program uses a function call with array passed as call by reference. Part of the Program has been given here. You need to complete the Program by writing the function. #include<stdio.h> void...

  • Help with these questions A function rectarea has already been defined with this prototype: int rectarea(int...

    Help with these questions A function rectarea has already been defined with this prototype: int rectarea(int width); It collects an integer height from the user and returns the area of the resulting triangle; Write code that will call rectarea twice with values 5 and 10, and print the results obtained. Warning: in a composed function like "f(a),b0);", you don't know whether a) will be called first or b(!. The variable age has been defined as an integer. Write code which...

  • Assuming that the array upc declared below has already been filled with MAX_LENGTH values, write a...

    Assuming that the array upc declared below has already been filled with MAX_LENGTH values, write a function that will ask to input an integer from the keyboard and perform a sequential search of the array for the input integer. If the input integer is found, print the index of the matching value in the array. Otherwise, print "Not found". Include declarations for all variables that you use.             const int MAX_LENGTH = 25;             int upc[MAX_LENGTH]; Please write in C++

  • Suppose v is an array with 100 int elements. If 100 is assigned to v[100], what happens? Show the code. An array of 1000 integers is declared. What is the largest integer that can be used as an index...

    Suppose v is an array with 100 int elements. If 100 is assigned to v[100], what happens? Show the code. An array of 1000 integers is declared. What is the largest integer that can be used as an index to the array? Shows the code. Consider the declaration: int v[1]; What is the index of the last element of this array? Declare an array named a of 10 int elements and initialize the elements (starting with the first) to the...

  • Programming language C Please go through this carefully. Needs function void add(int *a1, int n, int...

    Programming language C Please go through this carefully. Needs function void add(int *a1, int n, int *a2) Write a program addition.c that reads in an array (a1) of numbers, and creates a new array (a2) of numbers such that the first and last numbers of a1 are added and stored as the first number, the second and second-to-last numbers are added and stored as the second number, and so on. You need to check for even and odd length of...

  • 8. Given: struct STACK INF RC 1301 int top that the following functions have already been...

    8. Given: struct STACK INF RC 1301 int top that the following functions have already been declared in a stack tolkit and are available for create stack(s) push(s, item) pop(s, item) topls, item) empty(s) Boolean function use some or all of them to write the complete definition code for a function that passes in a stack (as an argument), removes the SECOND assume that there are at least two items in the stack). item (from the top) in the stack,...

  • Write a C++ program which inputs an array of integers from user then pass array pointer...

    Write a C++ program which inputs an array of integers from user then pass array pointer to function which will return sum of whole array. Also do same action by using address-based argument of array to another function. Note: In this you need to declare two factions: 1. With argument of pointer type. 2.With argument type of address type

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT