text: Question:
  What is, in your opinion, the most surprising, weird, strange or really "WTF" language feature you have encountered?
  Please only one feature per answer.
  Solution:1
  This is nothing strange or surprising, but it is something that made me always say WTF:
  Case sensitivity in syntax, or in identifier names.
  Most languages that have it just seem to have it because C has it. There is no good reason for it.
  Solution:2
  In SQL Server you may end up with a nasty surprise if you use
  select * in your production code. Using
  select * is not considered as a good practice anyway but it is good to know of some of the interesting behaviour.
  See question âselect * from tableâ vs âselect colA,colB,etc from tableâ interesting behaviour in SqlServer2005 for more details
  Solution.
  Solution:4.).
  Solution:5
  Not so long ago, when I first descoverd the C Language in my CS class, it was very strange to see the way pointers behaived. we just wrote programs and guess what it would do, until they get the right behavior
  Solution:6
  The C preprocessor and its usages. Specifically preprocessor metaprogramming and using the preprocessor to generate portable code -- total mindfcuk.
  Solution:7
  Labeled break and continue statements in Java..
  They allow you to break out of multiple control-blocks with a single break.
  Solution:8.
  Solution:9).
  Solution:10
  In C,
  a[b][c] is exactly the same thing as
  c[b[a]].
  Solution:11
  In PHP, you have to explicitly reference globals and explicitly use this-> for class variables. Makes refactoring fun. You cannot promote a variable/argument to a global or a class member without finding all points of usage.
  Solution:12.
  Solution:13
  this made me stunning
  #define _ -F<00||--F-OO--; int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO() { _-_-_-_ _-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_ _-_-_-_ }
  Solution:14.
  Solution:15
  Try, except, else
  try: pass except: pass else: pass finally: pass
  If no exception was caught the else part is executed.
  Makes sense, but at first I really hadn't any clue what it does.
  def show_square(string): try: n = int(string, 10) except ValueError: print "I can't do that, Dave." else: print n * n
  Solution:16
  shift;
  sometimes you see it in the very first line of a perl method to get read of self pointer
  Solution:17
  In ColdFusion
  Struct (aka Java HashMap) is passed by reference.
  You'd have thought other data type behaves like Java...
  Array is passed by value, wtf!
  List is just a plain old comma-separated string!
  Solution:18.
  Solution:19
  In.
  vector =: i. 10 NB. Vector will be 0 1 2 3 4 5 6 7 8 9 (10) (0) } vector NB. Will yield 10 1 2 3 4 5 6 7 8 9
  Solution:20
  In awk, arrays start at index 1, which is confusing the least.
  Solution:21)
  Solution:22
  The implict variables\constants and mutable constants in ruby
  Solution:23
  What datatype is foo?
  SELECT TOP 1 NULL AS foo INTO dbo.bar FROM sys.columns --trivial
  Why does everything go to zero?
  SELECT CAST('' AS int), CAST('' AS datetime), CAST('' AS float)
  ...except this
  SELECT CAST('' AS decimal)
  Solution:24
  In C#, the following code generates compiler error "Cannot convert from method group to Delegate". Though the logic behind is reasonable, it still feels strange to me.
  control.BeginInvoke(delegate { DoSomething(); });
  Solution:25
  A Java source file can end with the character
  \u001a (control-Z).
  Solution:26
  In Java, there is some inconsistency as to how Strings handle the == operator depending on how it was constructed.
  String a = "Hello"; String b = "Hello"; System.out.println(a == b ); // prints true. String c = new String("Hello"); String d = new String("Hello"); System.out.println(c == d ); // prints false
  Solution:27!)
  Solution:28)
  Solution:29
  Well the first thing that came to my mind was 'noop', my brain did the same thing when I first came across it!
  Solution:30
  In.
  Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
  EmoticonEmoticon