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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started