Question

In C programming State whether the following are true or false. If the answer is false,...

In C programming State whether the following are true or false. If the answer is false, give a few words to indicate why. Label your answers with the corresponding letter. A. A single array can store different types of values. B. A subscript can be type “float”. C. It is an error to initialize an array with fewer values then the declared size of the array. D. Passing an individual element of an array to a function allows the called function to modify the value. E. When using a #define, a programmer creates a syntax error. This is always flagged at the line where the #define is in the code.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
A single array can store different types of values.
False
array is homogeneous.

B. A subscript can be type “float”.
False
A subscript can be type “int”.

C. It is an error to initialize an array with fewer values then the declared size of the array.
False
It is an error to initialize an array with MORE values then the declared size of the array.

D. Passing an individual element of an array to a function allows the called function to modify the value.
False
Only if we pass array as reference can change the actual value of array.

E. When using a #define, a programmer creates a syntax error. This is always flagged at the line where the #define is in the code.
False.
This is always flagged at the line where we use defined variable/function.


Add a comment
Know the answer?
Add Answer to:
In C programming State whether the following are true or false. If the answer is false,...
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
  • State whether each of the following is true or false. If false, explain why: a.Referring to...

    State whether each of the following is true or false. If false, explain why: a.Referring to an array element outside the array bounds is a syntax error. b.When initializing an array at its declaration, it is a syntax error to provide less initializers than the number of array elements. c.A character array can be initialized using a string literal. d.An individual array element that is passed to a function and modified in that function will contain the modified value when...

  • C Programming Language 2(a) Define a struct with 1 int array named i, 1 float array...

    C Programming Language 2(a) Define a struct with 1 int array named i, 1 float array named f, and one double array named d, each of size M. (b)Declare array x with N of those structs. (c)Write a void function to traverse array x (using a pointer) assigning to each element in each array d (in each struct in array x) the sum of the corresponding elements in arrays i and f (in the same struct). Use 3 pointers (of...

  • Section 1: TRUE/FALSE (Please circle one) (I point for each question) 1. Staticvariables can be initialized...

    Section 1: TRUE/FALSE (Please circle one) (I point for each question) 1. Staticvariables can be initialized using other variables. 1. True 2. False 2. Declaration statements containing the word extern create new storage areas. 1. True 2. False 3. All computer operating systems use the same specification as to the maximum number of characters permitted for an external filename. 2. False 1. True 4. Using a subscript that references a nonexistent array element will always be detected by all C++...

  • C programming true or false 1) Pointer in a C program can only point to built...

    C programming true or false 1) Pointer in a C program can only point to built in types of variables in C. 2) In order to work with an external file, we must declare pointer to file first. 3) In order to use an external file in a C program, pointer to file must be declared first. 4) Header files created by a programmer, must be enclosed in <>, the same as the header files taken from a C library

  • Which statement is false? a. C automatically passes arrays to functions using simulated call by reference....

    Which statement is false? a. C automatically passes arrays to functions using simulated call by reference. b. When C passes an array to a function, the called function normally can modify the element values in the caller's original array. c. The name of an array is actually the address of the first element of the array. d. When an array is passed in a function call, the calling function knows precisely where in the called function's memory the passed array...

  • C++ Programming 1. Write a function (header and body) that accepts an integer as an argument...

    C++ Programming 1. Write a function (header and body) that accepts an integer as an argument and returns that number squared. 2. Write the code that will fill an integer array named multiples with 10 integers from 5 to 50 that are multiples of five. (This should NOT be in the form of an initialization statement.) 3. Write the code that will display the contents of the integer array named multiples. Recall: the size of the array is 10. 4....

  • C Programming QUESTION 2 Which of the following statements about pointer arguments are true? Select all...

    C Programming QUESTION 2 Which of the following statements about pointer arguments are true? Select all choices you believe are correct--this question may have more than one correct answer! A. The * operator allows you to access the address of an existing variable, while the & operator allows you to dereference a pointer and access the data to which it points. B. A function with pointer arguments must have the void return type. C. Pointer arguments allow you to write...

  • 31. True or False: The condition in the following if statement is a syntax error:

     31. True or False: The condition in the following if statement is a syntax error: int number=50;…… if (number)…… 32. True or False: The standard C functlon strlen) will return 4 when invoked upon the varlable name, declared below: char namel = (e', 'p', 't', 's', '\0', '1', '2', '1', '\0']; 33. True or False: A structure is a collection of related variables under one name. 34. True or False: In C, output parameters allow for a function to return more than one value Indirectly. 35. True or...

  • this is true and false for C++ (1 point each) Circle T for true or F...

    this is true and false for C++ (1 point each) Circle T for true or F for false for the following questions. 1. T/F The Boolean expression b1 || b2 evaluates to true if either Boolean value (b1, b2) is true. T/F The code we write in C++ (e.g. code in file project1.cpp) is referred to as source code. 2. 3. T/F The statement float scores[3][3] creates 3 arrays, each containing 3 floating-point variables. T/F For loops work best when...

  • Python Programming assignment : Function of Q3: def isPositive(n): if(n>=0): return True else: return False Write...

    Python Programming assignment : Function of Q3: def isPositive(n): if(n>=0): return True else: return False Write a code for function main, that does the following: -creates a variable and assigns it the value True. - uses a while loop which runs as long as the variable of the previous step is True, to get a number from the user and if passing that number to the function of Q3 results in a True value returned, then add that number to...

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