Question: Please help me to find the right answer: 1. Which of the following is NOT a valid declaration for a character string? a) char string1[3]

Please help me to find the right answer:

1. Which of the following is NOT a valid declaration for a character string?

a) char string1[3] = {1, 2, 3, 4}

b) char string1[12];

c) char string1[] = this is a string;

d) char string1[25] = this is a string;

2. The statement x++;

a) Increments the value currently stored in the variable x and stores that new value back in the variable x

b) Checks to see if x is at its maximum value and if so, exits the for loop

c) Moves the character pointer x to the next integer number in the string

3. The statement:

if(int x=5) {

Code;

}

a) Sets x to the value of 5 and since that is non-zero, returns true, and executes code

b) Checks to see if x is equal to 5 and if true executes code

c) Sets x to the value of 5 but since that is not a valid true/false test, does not execute code

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!