Computer Science, asked by justchintus2464, 6 months ago

What will be returned by the given query? SELECT INSTR("INDIA", "DI");
1 point
2
3
-2
-3

Answers

Answered by rickydarngawn123
0

Answer:

3

Explanation:

The first occurance of character DI in the string INDIA is in the Third I(first) N(second) D(third) I(fourth) A(fifth)

so the answer will be 3 as it occurred in the third string of the given INDIA. Hope this helps

Answered by amanpanday2811
0

Answer:

3

Explanation:-

Strings in programming languages-Like many other popular programming languages, strings in Python are arrays of bytes representing Unicode characters However, Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the string.A string is a data structure in Python that represents a sequence of characters. It is an immutable data type, meaning that once you have created a string, you cannot change it. Strings are used widely in many different applications, such as storing and manipulating text data, representing names, addresses, and other types of data that can be represented as text. Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the string. In Python, individual characters of a String can be accessed by using the method of Indexing. Indexing allows negative address references to access characters from the back of the String, e.g. -1 refers to the last character, -2 refers to the second last character, and so on.  While accessing an index out of the range will cause an Index Error. Only Integers are allowed to be passed as an index, float or other types that will cause a Type Error.To access a range of characters in the String, the method of slicing is used. Slicing in a String is done by using a Slicing operator (colon).

For more refers to-

https://brainly.in/question/7697308?referrer=searchResults

https://brainly.in/question/3380898?referrer=searchResults

#SPJ2

Similar questions