Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

What is a schedule?

Answered: 1 week ago