Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A variable name a value. 1, references a value and a pointer variable name refer

ID: 3884489 • Letter: A

Question

A variable name a value. 1, references a value and a pointer variable name references a) indirectly, directly b) directly, directly c) directly, indirectly d) indirectly, indirectly 2. The definition char string1[] "first"; = is equivalent to: a) char stringi ','', 'r', 's', 't',0' b) character string1 [ ] = { 'f', 'i', 'r', 's', 't', '' b) char string1 [ ] = { 'f', 'i', 'r', 's', 't' }; c) char stringi '','', 'r','s','t',o }; 3. Using the following function definition: AB(C the function name is represented by. a) A b) B c) C d) D

Explanation / Answer

1)c)directly,indirectly
Using a variable, we can directly get the value stored at the address, but the pointer variab
name stores the address of the variable holding the value.In this way it is indirect reference


2)c) char string1[]={'f','i','r','s','t'};
it is not a because in a , an extra character '' is added to the string which makes it a c string instead of a character array, like string1 in example
it is not b because character is not a legal data type
it is not d because we need to type[] to let the compiler know that it is an array, pther wise it will give an error
finally, c is he answer because it doesnt have any of the probles demonstrated above


3)b) B
a function definition is
return_type function_name(arguments)
{ function body
}

4)b) main
if, return and int are defined keywords.
main is the name of a function from where the compiler starts execution


5)d) do...while
if and if else evaluate an expression and based on the ouctome select the code to be executed ,once. It doesnt loop
switch statement selects a piece of code to be executed out of several others based on the value or expression passed to it
do while is a looping structure as it executes a piece of code again and again as long as the condition in while is fulfilled


6)d) the c program is translated into machine language code

7)a) locations in the computer's memory
a variable is a name given to memory location storing the value

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote