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

1. An argument is a) a variable without a data type b) when the compiler disagre

ID: 3930679 • Letter: 1

Question

1. An argument is

a)      a variable without a data type

b)      when the compiler disagrees with your syntax

c)      the data passed to a function

d)      a value with an undetermined decimal point

2. Assume string1 is a character array. Which of the following operations does not produce a string?

a)       string1[] = “ ”;

b)       string1[] = { ‘L’, ‘I’, ‘V’, ‘E’ };

c)       string1[] = { ‘L’, ‘I’, ‘V’, ‘E’, ‘’ };

d)       string1[] = “LIVE”;

3. Assuming that int a has a value of 4and that integer array b has 10elements, what is the correct way to assign the value of the sum of 4and the fourth element, to the fifth ele-ment of the array?

a)       b[ a ] + 1 = b[ a + 4];

b)       b[ a + 2 ] = b[ a ] + 3;

c)       b[ a ] = b[ a -1 ] + a;

d) none of the above

a)      a variable without a data type

b)      when the compiler disagrees with your syntax

c)      the data passed to a function

d)      a value with an undetermined decimal point

Explanation / Answer

1)

Ex:

int add(int x,int y)

{

return x+y;

}

int a=10;

int b=20;

add(a,b);

Hence the correct option is “c  the data passed to a function

2)

Hence the correct option is “b)  string1[] = { ‘L’, ‘I’, ‘V’, ‘E’ };

3)

Hence the correct option is “c)   b[ a ] = b[ a -1 ] + a;”