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....

  • JAVA programming The task of parsing a file for correctness is an essential part of any...

    JAVA programming The task of parsing a file for correctness is an essential part of any programmer toolkit. The check for a balanced set of brackets in a file a Stack can be used and the following algorithm: • The source file is read character by character • Each time an opening '{' is read it is pushed onto the stack • Each time a closing '}' is read the stack is popped • If the stack is empty when...

  • 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...

  • 1. What does the below C++ statement do? vector<double> myVec(20); Group of answer choices A.It creates...

    1. What does the below C++ statement do? vector<double> myVec(20); Group of answer choices A.It creates a vector object that can only store values of 10 or less. B.It creates a vector object with a starting size of 10. C.It creates a vector object and initializes the first element with the value 20. D.It creates a vector object with a starting size of 20. 2. A recursive function contains a call to itself, but is limited to 10 recursive calls...

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