FACTOID # 8: Bookworms: Vermont has the highest number of high school teachers per capita and third highest number of librarians per capita.
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
People who viewed "Gotcha" also viewed:


FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:



(* = Graphable)



Encyclopedia > Gotcha

A gotcha is a detrimental condition (usually of a contract or agreement) that is designed to sneak past the other party. For example, many "free" Credit Report sites have "gotchas" that automatically sign you up for a monthly credit report service unless you explicitly cancel. "Gotcha" is also a frequently used programming term. Look up gotcha in Wiktionary, the free dictionary. ...


Programming gotchas

In programming, a gotcha is a feature of a system, a program or a programming language that works in the way it is documented but is counter-intuitive and almost invites mistakes because it is both enticingly easy to invoke and completely unexpected and/or unreasonable in its outcome.

Gotchas in the C programing language

Equality operator

The classic gotcha in C is the fact that

 if (a=b) code; 

is syntactically valid and sometimes even correct. It puts the value of b into a and then executes code if a is non-zero. What the programmer probably meant was

 if (a==b) code; 

which executes code if a and b are equal.

Function calls

In C and C++, function calls that need no arguments still require parentheses. If these are omitted the program will still compile, but will not produce the expected results. For example:

 #include <iostream> using namespace std; int myfunc(){ return 42; } int main (){ cout << myfunc; return 0; } 

The program will only display the expected result (the string 42) if the form cout << myfunc(); is used. If the shown form cout << myfunc; is used, the address of the function myfunc is cast to a boolean value, and the program will instead display the string 1.

Gotchas in the C++ programing language

Initializer lists

In C++, it is the order of the class inheritance and of the member variables that determine the initialization order, not the order of an initializer list:

 #include <iostream> class CSomeClass { public: CSomeClass(int n) { std::cout << "CSomeClass constructor with value "; std::cout << n << std::endl; } }; class CSomeOtherClass { public: CSomeOtherClass() //In this example, despite the list order, : obj2(2), obj1(1) //obj1 will be initialized before obj2. { //Do nothing. } private: CSomeClass obj1; CSomeClass obj2; }; int main(void) { CSomeOtherClass obj; return 0; } 

External links

Look up gotcha in
Wiktionary, the free dictionary.
  • from the HyperDictionary

Wikipedia does not have an article with this exact name. ... It has been suggested that French Wiktionary be merged into this article or section. ...


Gotchas is a well known saltwater lure (artificial bait) that is used off of beaches, piers, bridges, jetties, etc. They come in a variety of colors and are pretty heavy and have treble hook on them. You can cast them long distances and you work the lure as fast as you can twitchin it to make it go back and forth. Some fish that you can catch with a Gotcha would be a spanish mackeral, Bluefish, Jack, etc. A gotcha really is a great saltwater lure. A treble hook is a fishing hook with a single eye and shaft but three hook points set 120 degrees apart from each other, similar in design and appearance to grappling hooks. ... Binomial name Scomberomorus maculatus (Couch, 1832) The Atlantic Spanish mackerel, Scomberomorus maculatus, is a migratory species of mackerel that moves to northern Gulf of Mexico in spring, return to south Florida in eastern gulf, and to Mexico in western gulf in fall. ... Binomial name Pomatomus saltatrix (Linnaeus, 1766) The bluefish (Pomatomus saltatrix), called tailor in Australia,[1] is a species of popular marine game-fish found in all climates. ... Look up Jack, jack in Wiktionary, the free dictionary. ...

  Results from FactBites:
Gotcha - About Gotcha (326 words)
The award-winning Gotcha Fishman logo is unveiled amidst outcries from groups who object to the « satanic » symbolism of the Fishman’s trident.
The first Gotcha Tahiti Pro is held at the then relatively unknown Teahupo, causing the surf world to shake in its boots.
Gotcha continue to make history, reinventing and innovating what we love, surfing, and the spirit of Californian Surfwear.
GOtcha (340 words)
GOtcha is a system to predict the function of a protein and assign confidence to the prediction.
GOtcha was conceived and developed by David Martin and his announcement to the go-friends mailing list is shown below:
GOtcha is a tool for assigning GO terms based on sequence similarity searches to well annotated genomes.
  More results at FactBites »



Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m