Question

write a declaration statment for a 1-D array called timedata with a lenght of n, where...

write a declaration statment for a 1-D array called timedata with a lenght of n, where n is a pre-declared integer variable. (in other words, n hs already been declared in adavnce.) (remember, you cannot intialize variable-lenght arrays in a decleration statement)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

To declare an array in C, a programmer specifies the type of the elements and the number of elements required by an array as follows

type arrayName [ arraySize ];

Answer to your question is=

int timedata[n];

Add a comment
Know the answer?
Add Answer to:
write a declaration statment for a 1-D array called timedata with a lenght of n, where...
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
  • Write a declaration for a global array called words. Explain where the code should be placed...

    Write a declaration for a global array called words. Explain where the code should be placed so it is global.

  • 1.The code box below includes a live 2 dimensional array variable called gridNums. This array holds...

    1.The code box below includes a live 2 dimensional array variable called gridNums. This array holds integers. You cannot see its declaration or initialization. What value is in the zeroth (initial) position of the second row? Print this array entry to the console. (Note: remember that the second row is actually row 1). Enter your code in the box below. 2.The code box below includes a live 3x3 2-dimensional array variable called fredsNums. This array holds integers. You cannot see...

  • DESCRIPTION: You will be given a 1-D array, called wordFun, of Strings. The array has an...

    DESCRIPTION: You will be given a 1-D array, called wordFun, of Strings. The array has an unknown number of cells filled with data. As before, the array will already be filled with strings, some of which contain the string "Angela". You will create a method called countItUp which returns and integer array containing the number of times each of the letters in my name occur within the strings within this array. For example, if the input array was wordFun =...

  • DESCRIPTION: You will be given a 1-D array, called wordFun, of Strings. The array has an...

    DESCRIPTION: You will be given a 1-D array, called wordFun, of Strings. The array has an unknown number of cells filled with data. As before, the array will already be filled with strings, some of which contain the string "Angela". You will create a method called countItUp which returns and integer array containing the number of times each of the letters in my name occur within the strings within this array. For example, if the input array was wordFun =...

  • 1. write the lines to swap the value at index j of array a with the...

    1. write the lines to swap the value at index j of array a with the value at inex j+1 if the value at index j is greater. 2. write the lines to declare 2 variables one as double and intialize it to 2.5 and the other as character and intialize to character b. then call a function called f and pass these variables by reference. 3. write the function f of previous questions to modify the value of the...

  • 13. Write a recursive function with the declaration: int count Equal (int* numbers, int n, int...

    13. Write a recursive function with the declaration: int count Equal (int* numbers, int n, int x) that has as parameters an array numbers with n > 0 elements, and an integer x, and returns how many times I appears in the array. 14. Write a recursive function with the declaration: double dist(double* u, double *v, int n) that gets two double precision arrays with n > 1 elements and returns the value: Vu[0] - v[0])2 + (u[1] – v[1])2...

  • Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized...

    Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized with the following strings: “Einstein”, “Newton”, “Copernicus”, and “Kepler”. 2. Assume names in an Integer array with 20 elements. Write a pseudocode algorithm a For Loop that displays each element of the array. 3. Assume the arrays numberArray1 and numberArray2 each have 100 elements. Write a pseudocode algorithm that copies the values in numberArray1 to numberArray2 . 4. Write a pseudocode algorithm for a...

  • write a Matlab program ( solve the three questions). please use array and create your own...

    write a Matlab program ( solve the three questions). please use array and create your own function to check primality Question 1 : [10 points) Write a MATLAB program that will store all the first 1000 prime numbers in an array variable named arr_of_primes. Please note that a prime number is a positive integer that is bigger than or equal to 2 which is divisible only by 1 and itself. Examples of the first 8 primes are: 2, 3, 5,...

  • advance java 244 Louis Abe Mujang: Attempt 1 Question 11 (1 point) Write an array declaration...

    advance java 244 Louis Abe Mujang: Attempt 1 Question 11 (1 point) Write an array declaration and allocation that meets the following criteria The array is of type String. The array is named sa. The declaration and allocation should be in the same line of code. The array is allocated to a length of 100 elements. There should be no initializer list. Don't forget the semicolon. 12 Question 12 (1 point) If you declare an array that is 256 elements...

  • using matlab In Class Exercises 8-Arrays For the following exercises, assume an array is already populated, your job is to write a program that traverses the array. DO NOT HARD CODE the last in...

    using matlab In Class Exercises 8-Arrays For the following exercises, assume an array is already populated, your job is to write a program that traverses the array. DO NOT HARD CODE the last index. In other words, you code for 1-4&6 should be able to handle the following 2 arrays: amp2 10 array1 [52, 63, 99, 71, 3.1] array2 - [99:-3: 45); For 5: wordArray1 wordArray2 ('number, 'arrays', 'indices', 'hello', finish' [number, 'different, 'finish? 1. Determine the sum of all...

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