//a.c #include&lt;stdio.h&gt; int main() {     printf("%d \n",sizeof'A');   //the result is 4     return 0; }   why the result of sizeof'A' is 4 in c? I run it in windows 7 X64,vs2010.  //a.cpp #include&lt;stdio.h&gt; int main() {     printf("%d \n",sizeof'A');   //the result is 1     return 0; }   in a .cpp file the rusult is 1.why?
In C++, sizeof('a') == sizeof(char) == 1. This makes intuitive sense, since 'a' is a character literal, and sizeof(char) == 1 as defined by the standard.  In C however, sizeof('a') == sizeof(int). That is, it appears that C character literals are actually integers. Does anyone know why? I can find plenty of mentions of this C quirk but no explanation for why it exists.
How to remove ":" (colon) when displaying field name? I created a custom content type with some text fields. In the view settings of that content type I defined both to appear and as well their titles (names of the fields) to be displayed above the content of the fields respectively.  But how can I remove the trailing colon of the titles? Is there a way of modifying the way field names are display just for certain content types? I do not want this altered site wide (e.g. for all fields of all content types).  PS: I'm already using the "views" module to define a special layout for this custom content type. Probably there is a way to carry out these changes with the help of the "views" module and a custom layout template?  /edit/ I did not create a view (as with the "views" module) to display that content but used Drupal's own content type view configuration (maybe called "display"). I'm working with a localized Drupal and retranslating the different words.  Remark: Using Drupal 7.10 with Views 7.x-3.0-rc3 I would like to see my review audit history Proof of Funds for Canadian Visa I am a Romanian citizen.  Our co-national friends who are established in Canada will provide me and another person free accommodation and food. We are both EU citizens and we will stay in Canada 1 month.  These days we are gathering documents for our online visa application and we need to prove that we have enough money to spend there.   How much money is generally required in order to be sure we are eligible? We don't plan to spend more than 1000 EUR, but I intend to bring at least 2000 CAD. Is it enough? How to find all the subclasses of a class given its name? When testing the difference between 2 proportions why do we use a z-test rather than a t-test?    Further, is there a simple way to conduct an omnibus test for significant differences between more than 2 proportions (in the form of percentages). Is there an equivalent to a one-way ANOVA for this?  I imagine that you could use logistic regression (assuming you have the original data for the proportions in the form of 0s and 1s) Are there other options? How this java code produces deadlock? Example to prove that $ C^1[0,1] $ is not a Banach space for the uniform norm? The space $ C^1[0,1] $- the space of all continuously differentiable functions on $ [0,1]$ is not a Banach space with respect to the sup norm,$ \|.\|_{\infty} $ since the uniform limit of a continuously differentiable function need not be differentiable.  How can I illustate this statement using a counter example? Can I use $ f_{n}=\frac1 n \sin nx $ as a counter example?  Also, is $ C^1[0,1] $ is same as the space given by $ X=\{f\in C^1[0,1]:f(0)=0 \}$. Can I use the same example to show that this is not a Banach space?  More help is appreciated! Thanks! NullPointerException accessing views in onCreate() Creating polygons as % of original area using ArcGIS Desktop? I have a polygon shapefile and need to create new polygons, within the originals, as % of original area.  I used buffer by field (Field= new area as %) but the buffers are created in circles around the polygons.  What am I doing wrong?  I am using ArcGIS Desktop 10. Notation and the name choice for meet and join (in order theory) I have two simple questions:   From where do the names  come from? I don't see any intuition between those names in context of order theory. From where does the notation come? I have to admit, I always had an impression that notation we use is somewhat backwards... just take the look at the picture at the wikipedia!    I used this notation a lot of times and I have to admit that often I have to stop for a minute and convince myself that I'm indeed using it right. I'm hoping that learning a bit about origin and context of name choice and notation will make it easier. Journals selection - alternative criteria to impact factor While trying to select the journals I can submit my present work and future work, I realize the time between the date the authors send the article to the journal and when the revised article is submitted. Usually this is something between 6 months and more than 12 months.  Althought I am focusing on the Impact Factor (IF) to select journals, I think that 12 months to have a feedback that might include "add more variables analysis","this article will be more valuable if you test also model x,y and z", can have a huge impact on you work. It will make you stop what you are currently doing and possible spend up to 2 months making the changes. This might make a big mess on your work if you have deadlines to respect, however this happens to everyone in academia.  My question is, besides the IF journal based selection, how can we select a journal with enought quality with lower IF? What alternative criteria should one use to select the journal? Should we choose newly created Journals? Why is the root directory denoted by a / sign? I have done some research about this on Google, but the results were cloudy. Why is the / sign used to denote the root directory. Are there any solid reasons behind it? Absolute path & Relative Path What's the difference between absolute path &amp; relative path when using any web server or Tomcat? How can I include a YAML file inside another? So I have two YAML files, "A" and "B" and I want the contents of A to be inserted inside B, either spliced into the existing data structure, like an array, or as a child of an element, like the value for a certain hash key.  Is this possible at all? How? If not, any pointers to a normative reference? For some reason my Steam just broke today after working perfectly since I installed it a few days ago.  It was originally installed via the deb from the Steam site. So I uninstalled that using the Ubuntu Software Center. Then I installed steam-launcher. When I run it from the menu it does nothing at all. When I go through terminal it gives this message, no error:  $ steam/usr/bin/steam:  line 196: /home/andrew/.local/share/Steam/steam.sh: Success   So I purge-removed it and removed the .steams directory from my home directory but on re-installation its the same story.  I am using Xubuntu 12.10 64bit.  It appears that steam .local/share/Steam/steam.sh is blank. What is it meant to have in it? I am so confused with how reinstalling it doesn't fix it. I am trying to find the name of a direct to TV movie, possibly a 2-3 part miniseries which I believe aired on the SciFi channel in the 90s. I don't remember who starred in it, but the movie opened with an astronaut attempting reentry whose shuttle ends up exploding. He awakes in a large bubble of air in a river and after reaching the surface and swimming to shore, meets several other people, from seemingly many different times throughout history (including one alien, who died on Earth).  Over the course of the movie, we learn the world is the afterlife, where everyone goes when they die. The major plot involves launching a steamboat (built by Mark Twain, no less) to travel up a river to the mountains, where the beings responsible for bringing everyone to this world are.  Does anyone know what the title of this movie/miniseries is? I'm a C++ guy learning Java. I'm reading Effective Java and something confused me. It says never to write code like this:  String s = new String("silly");   Because it creates unnecessary String objects. But instead it should be written like this:  String s = "No longer silly";   Ok fine so far...However, given this class:  public final class CaseInsensitiveString {     private String s;     public CaseInsensitiveString(String s) {         if (s == null) {             throw new NullPointerException();         }         this.s = s;     }     :     : }  CaseInsensitiveString cis = new CaseInsensitiveString("Polish"); String s = "polish";    Why is the first statement ok? Shouldn't it be   CaseInsensitiveString cis = "Polish"; How do I make CaseInsensitiveString behave like String so the above statement is OK (with and without extending String)? What is it about String that makes it OK to just be able to pass it a literal like that? From my understanding there is no "copy constructor" concept in Java? $P[X=x]=0$ when $X$ is continuous variable If $\int_0^x f \ dm$ is zero everywhere then $f$ is zero almost everywhere I have been thinking on and off about a problem for some time now. It is inspired by an exam problem which I solved but I wanted to find an alternative solution. The object was to prove that some sequence of functions converges weakly to zero in $L^2$.   I managed to show (with some help) that the limit $f$ (of a subsequence) satisfies $\int_0^x f \ dm=0$ for all $x&gt;0 $. From this I want to conclude that $f=0$ a.e. I can do this with the fundamental theorem of calculus in its Lebesgue version but there ought to be a more elementary proof.  Can someone here help me out? Effect of elementary row operations on determinant?