Question: C programming 1) When setting a two-dimensional character array, how is the size (number of characters) in the second dimension set? Select an answer: The

C programming

1)

When setting a two-dimensional character array, how is the size (number of characters) in the second dimension set?

Select an answer:

  • The number of elements are equal to the average size of all the strings.

  • To the length of the longest string; you don't need to add one because the first array element is zero.

  • To the length of the longest string, plus one for the null character.

  • The second dimension is equal to the number of strings, plus one.

2)

Yuri wants to use constant Y in a for loop. Which of the following is valid?

Select an answer:

  • for(y=0;y

  • for(x=1;x

  • for(y=0;y<20;y++)

  • all of these answers

3)

Assume that 1 is TRUE and 0 is FALSE, which of the following logical evaluations is TRUE?

Select an answer:

  • FALSE || FALSE

  • !(TRUE || FALSE)

  • !FALSE

  • TRUE && FALSE

4)

Can you display a single character as a value?

Select an answer:

  • Yes, by changing the printf() function's placeholder from %c to %d.

  • Yes, by using a chtype function that output's the character's ASCII value.

  • No, characters and values are separate data types in C.

  • No, though you can use a chtype function to convert digits 0 to 9 to their numeric counterparts.

5)

Which of the following is true?

Select an answer:

  • All arguments passed to a function must be variables.

  • A function's arguments must all be of the same variable type.

  • Arguments passed to a function are treated as variables within the function.

  • None of these are true.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!