Question: c programming 1) To obtain the proper amount of memory required, which argument should you place in the malloc() function? Select an answer: the number
c programming
1)
To obtain the proper amount of memory required, which argument should you place in the malloc() function?
Select an answer:
-
the number of bytes required
-
a pointer
-
the size of the data type required multiplied by the number items
-
a pointer of the data type required multiplied by the number of items
2)
What is the array notation equivalent of the following expression: *(array+3)
Select an answer:
-
array[3]
-
*array[3]
-
The expression cannot be translated into array notation.
-
array[3][0]
3)
Adding 1 to the address stored in integer pointer ptr does what?
Select an answer:
-
It adds one byte (memory location) to the address stored in ptr.
-
It causes an error as you cannot manipulate memory stored in a pointer.
-
It adds the integer value 1 to the address stored in the pointer variable.
-
It adds to the address stored the size of one integer variable.
4)
What are four pieces of information you can gather about a variable?
Select an answer:
-
Data type, name, sizeof operator, and ampersand operator.
-
Data type, name, initial value, storage size, and location in memory.
-
Data type, name, size in bytes, and location in memory.
-
You can obtain only three pieces of information about a variable: its data type, name, and value.
Step by Step Solution
There are 3 Steps involved in it
Lets go through each question step by step Question 1 To obtain the proper amount of memory required which argument should you place in the malloc fun... View full answer
Get step-by-step solutions from verified subject matter experts
