True or False: int array[]; is a valid array declaration.What values are contain
ID: 3531879 • Letter: T
Question
True or False: int array[]; is a valid array declaration.What values are contained in ar if it's defined: int ar[10] = { 2, 4, 6, 8, 10 };- All of the values are garbage
- 2, 4, 6, 8, 10, and the remaining values are garbage
- 2, 4, 6, 8, 10, and the remaining values 0
- 2, 4, 6, 8, 10, 2, 4, 6, 8, 10
- 0
- 25
- 40
- they will not be initialized
- the number of chars in an array of char, including the null
- the number of chars in an array of char not including the null
- the declared number of chars an array can hold
- both s1 and s2 must be valid strings
- only s2 must be a valid string
- s1 must have room to contain the result
- only s2 must be a valid string and s1 must have room to contain the result
- 0 if the two strings are equal
- a negative value if the first argument is alphabetically less than the second
- a positive value if the first argument is alphabetically greater than the second
- nothing
- strcpy( str1, str2 );
- strcpy( str2, str1 );
- strcpy( str1 = str2 );
- strcpy( str2 = str1 );
- char ar[80];
- char ar[79];
- char ar[81];
- char ar[];
Explanation / Answer
Write a function called printAr that will display the values in an array of integers. The function takes two arguments: an array of integers and an integer that represents the number of values to display. The function returns nothing.
void printAr(int arr[],int length){ int i; for(i=0;i<length;i++){ printf("%d ",arr[i]); } return; }
Complete the following sentence: the unsubscripted name of an array is __an pointer to the first element of the array___
Suppose that an integer array has been declared to hold 40 elements. At the time that it was declared, the first 25 elements were also initialized. What value will the remaining elements of the array be initialized to?
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.