I ran the below code on my computer:  char ch = 'E'; System.out.print(ch + ++ch);   I expected EF but the output was 139. Why is the ASCII value added and printed.  My question is why is the output is 139 not EF?
8464
How do you concatenate characters in java? Concatenating strings would only require a + between the strings, but concatenating chars using + will change the value of the char into ascii and hence giving a numerical output. I want to do System.out.println(char1+char2+char3... and create a String word like this.  I could do   System.out.print(char1); System.out.print(char2); System.out.print(char3);   But, this will only get me the characters in 1 line. I need it as a string. Any help would be appreciated.  Thanks
2231
I assume this is really basic question, I'm new to LaTeX, I read a first step tutorial to get ready to write some documents but I couldn't answer my own question at this time and I really don't know where to search.  When I try to write é and compile my document, this character is not shown. I know the sequence is \'e to make it happen in the document but that is really disturbing to write.  Is there someway to write a paragraph "normally" and convert all the special chars into the LaTeX syntax? Or is there a way to allow é, à, ... writing so the compilation includes them into the document?
271
How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).
122327
I want to I check whether a string is in ASCII or not.  I am aware of ord(), however when I try ord('é'), I have TypeError: ord() expected a character, but string of length 2 found. I understood it is caused by the way I built Python (as explained in ).   Is there another way to check?
64050
I'm trying to use String.Format("{0:c}", somevalue) in C# but am having a hard time figuring out how to configure the output to meet my needs. Here are my needs:   0 outputs to blank 1.00 outputs to $1.00 10.00 outputs to $10.00 100.00 outputs to $100.00 1000.00 outputs to $1,000.00   I've tried String.Format("{0:c}", somevalue) but for zero values it outputs $0.00 which is not what I want. I've also tried String.Format("{0:$0,0.00;$(0,0.00);#}", somevalue), but for 1.0 it outputs $01.00. String.Format("{0:$0.00;$(0.00);#}", somevalue) works for most cases, but when somevalue is 1000.00 the output is $1000.00.   Is there some format that will fit all 5 cases above? All of the documentation I've read only details the basics and doesn't touch on this type of scenario.
32121
I want to get the ASCII value of characters in a string in C#.  If my string has the value "9quali52ty3", I want an array with the ASCII values of each of the 11 characters.  How can I get ASCII values in C#?
38175
For example: sizeof(char*) returns 4.  As does int*, long long*, everything that I've tried.  Are there any exceptions to this?
34146
This is a .NET question for C# (or possibly VB.net), but I am trying to figure out what's the difference between the following declarations:  string hello = "hello";   vs.   string hello_alias = @"hello";   Printing out on the console makes no difference, the length properties are the same.
35663
My controller code is as follows -          for(String resStr : responseArray){             if(resStr.indexOf('r_error_str') != -1){                 responseString += resStr.substring(resStr.indexOf('=') + 1);                  responseString += '\n';             }         }   but when i display this 'responseString ' String using 'apex:outputLabel or apex:outputText or as Exception message '\n' is not converting in new line. Whole String is coming in one line.  Can anyone explain why is this happining
13911
Possible Duplicate:          Here is a test case:   void foo(int i, int j) {    printf("%d %d", i, j); } ... test = 0; foo(test++, test);   I would expect to get a "0 1" output, but I get "0 0"  What gives??
95134
When printing a single character in a C program, must I use "%1s" in the format string? Can I use something like "%c"?
88167
I have come across several commands that use 2&gt;&amp;1 and 1&gt;&amp;2, but I quite can't get my head around the purpose of using it and when I should be using it.  What I understand  I know that 1 represents standard out and 2 represents standard error. I understand that 2&gt;&amp;1 combines the output of 2 to 1 and vice versa.  What I don't get   When should I be using it? What purpose does it serve?
28473
How do I get the  value of a character as an int in ?
54729
I'm looking for a way to convert a preprocessor token to a string.  Specifically, I've somewhere got:  #define MAX_LEN 16   and I want to use it to prevent buffer overrun:  char val[MAX_LEN+1]; // room for \0 sscanf(buf, "%"MAX_LEN"s", val);   I'm open to other ways to accomplish the same thing, but standard library only.
80556
What's going on?! Subtraction works fine until I get to 0.1 - 0.1. I'm in visual c# 2008 using the nonoba.com API.  Console.WriteLine("hit! " + Users[targetNum].character.health + " : " + player.character.profile.attackPower);  Users[targetNum].character.health -= player.character.profile.attackPower;  Console.WriteLine("health! " + Users[targetNum].character.health);   output:  hit! 0.1 : 0.1 health! 1.490116E-08   Thanks all - I might use the decimal type, as I'm normally adding/subtracting nice "round" numbers. For now I'll just go with:  if (Users[targetNum].character.health &lt;= 0.00001)   By the way I knew this wasn't really going to be a "bug" in c# - I thought it would either by a bug in my code or some lack of understanding, which it was.  Having read all the recommended reading, I'm going to conclude that my folly was due to normally using the ActionScript Number type, which maybe has a decimal rather than binary floating point - anyway, it would never give this output.
59676
What exactly do \csname and \endcsname do? What are their job? I have glanced at the Texbook and some other books, but none of them was clear enough to me. Can anyone please give a simple example to clarify this issue?
924
The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.