• Register
0 votes
352 views

Problem:

What are the valid indexes for the string 'New York'?
a. 0 through 7
b. 0 through 8
c. -1 through -8
d. -1 through 6

5 3 2
7,520 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution:

0 through 7

6 4 2
14,580 points
0 votes

Explanation:

String constants is also know as string literal, it is special type of constants which store fixed sequences characters. String constant is set of characters enclosed double quotes. For example string constant consists of 5 exclamation mark will be '!!!!!' , and empty string or null string will be like "". It occupy two bytes. String constant allow model to be adjusted as strings. String constant size is number of bytes associated with string plus one additional byte for terminating null byte. The character written in double quotes are automatically know as string by the D compiler.

15 10 7
8,280 points

Related questions

0 votes
1 answer 24 views
24 views
Problem: Hi there! I am learning SQL. Somewhere I saw a multiple choice question in which a list of terms was given and I had to choose the terms that refer to the commands used to create or modify database tables and columns. Following is the list of keywords: ... of most of these commands. I have learned only basics yet. If someone could explain all these commands, I would be grateful. Thanks!
asked Jan 16 Code Learner 6.5k points
0 votes
1 answer 7 views
0 votes
1 answer 2 views
2 views
Problem: How do we insert new records in a database?
asked 1 day ago Code Learner 6.5k points
0 votes
1 answer 31 views
0 votes
0 answers 50 views
50 views
Problem: What does the following UML diagram entry mean? + setHeight(h : double) : void A) this is a public attribute named Height and is a double data type B) this is a private method with no parameters and returns a double data type C) this is a private attribute named Height and is a double data type D) this is a public method with a parameter of data type double and does not return a value
asked Aug 4, 2020 ArifulIslam 7.5k points
0 votes
0 answers 12 views
12 views
Problem: In the following code, what values could be read into number to terminate the while loop? Scanner keyboard = new Scanner(System.in); System.out.print(Enter a number: ); int number = keyboard.nextInt(); while (number < 100 && number > 500) { System.out.print(Enter another number: ); number = keyboard.nextInt(); }
asked Jul 22, 2020 kTyson 14.6k points
0 votes
2 answers 248 views
248 views
Problem: In what type of attack does the attacker send unauthorized commands directly to a database?
asked Apr 12, 2020 ArifulIslam 7.5k points
0 votes
1 answer 46 views
46 views
Problem; valid c++ identifiers
asked Feb 6 kaash_kashi 1.2k points
0 votes
1 answer 29 views
29 views
String or binary data would be truncated in SQL I have the error when I am inserting a row in SQL. Any idea?
asked Nov 25, 2020 miki 1.9k points
0 votes
2 answers 90 views
90 views
Problem: Write a String constant consisting of exactly 5 exclamation marks?
asked Apr 12, 2020 ArifulIslam 7.5k points