a="hello", b="bye", c=a*b then print c? [closed] - string

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I came across one question like this
a="hello", b="bye", c=a*b
then what will the anwser of print c?

That depends on the implementation of the * operator on string data types. And that usually depends on the programming language you use. In most statically typed languages I know, this operator is not defined on strings.

In JavaScript, the value of c will be NaN.

It's a trick question, I think. You can't multiply a string with another string. I don't think any language allows this.

Related

Algorithm to find where exactly two strings match/differ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am working on finding the similarity/differences in the source code of different java programs.
I've used an implementation of the Levenshtein algorithm to find how similar two programs are.
I want to know if there is any algorithm that can help in finding the exact positions where two strings differ.
You will find more than you ever wanted to know by looking at the inner workings of diff - see for example this link or simply the wiki article

Urm, List<T>() in C++/CX? Any kind of List, Collection - even an ObvervableCollection? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am trying to bind (in XAML) to a List in C++/CX and I can't seem to have any Lists. Where'd they all go? Any kind of list will do... Even a Dictionary, or Stack, or ... something! Or has C++ changed that much since I last used it?
There are C++/CX implementations of the Windows collection interfaces in the Platform::Collections namespace, defined in <collection.h>.
See also the article on Collections in C++/CX on MSDN.

Algorithm to print all permutations of a string with no duplicates [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Can you give me an algorithm to print all permutations of a string, with no duplicates, both recursively and iteratively?
This is actually a good question since permutations are used fairly frequently and can be hard to implement especially without redundancies. Of course the algorithm is pretty simple. Here is a good site to help you out (after googling around for a second). Check it out, hope its what you are looking for! http://www.bearcave.com/random_hacks/permute.html

Sokoban in Haskell? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I don't know if this is a proper question, but if I want to write a Sokoban game in Haskell (or other functional programming languages), what's the differences with writing it in C? [Edit: does Haskell have any advantages over C in Sokoban ?]
I would like to ask this question because of two reasons. First, my only interest in programming is to write Sokoban programs (I have already written several sokoban programs). Second, I've read some introduction/tutorial articles about Haskell, but have no idea how these new methods can be applied to the Sokoban logic.

String classes concept in any language [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I would like to know if in any language is something like this:
There are often strings that gives to an application at runtime some information that is not of informative but more functional so every character really matters. But if you mistype a single character there is a problem that can be found only in runtime.
So what I would like is a language that would find such a problem in compile time, is there anything that could do the trick in any language?
Thank you.
Congratulations, you just invented a struct. You shouldn't keep stuff like this in a string, that's what structured data is for.
You mean a mis-typed configuration value? Something like
colour = 'blue';
v.s.
color = 'blue';

Resources