answersLogoWhite

0


Best Answer

sizeof('3') returns 1 - its the size of a char sizeof("3") returns 2 - its the size of two chars - '3' and '\0' sizeof(3) returns 4 - its the size of an int (in a 32 bit system)

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What will be the results of the operations sizeof 3 within single quotes and sizeof 3 within double quotes and sizeof 3 and why?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you use both single quotes and double quotes for strings in php?

Yes, you can use both single quotes (' ') and double quotes (" ") for defining strings in PHP. However, the choice between single and double quotes depends on whether you need to include variables or special characters within the string. Single quotes treat everything as a literal string, while double quotes allow for variable interpolation and escape sequences.


What is the difference between single quotes and double quotes?

in programming, single quotes are for characters, and double quotes are for string, but in php, javascript, html, css i don't see any difference between the two.


Why are double quotes used in C programming?

In C programming, double quotes are used to indicate String literal. char *s = "Hello World"; Where as single quotes are used to indicate a single character. char x = 'a';


What is the difference between single quotes and double quotes in PHP?

There's not too much of a difference. Most people prefer using double quotes because of the fact that you can do this: <?php $var2 = "Look at {$var1}!"; ?> which you can't do the {} thing with single quotes. You would have to do <?php $var = 'Look at '.$var1.'!'; ?>


Do single-quoted string literals have any characteristics difference from those of double-quoted string literals?

The literals with single quotes are Characters and can have a width of only one. Ex: 'y' or 'a' etc Strings cannot be declared using single quotes. They have to be declared with double quotes.


In PHP you can use both single quotes ( ' ' ) and double quotes ( ) for strings?

You can use single quotes $variable = 'string'; You can use double quotes $variable = "string"; You can use the Heredoc method $variable = <<<EOT Very Long String EOT; And you can use the Nowdoc method (after PHP 5.3.0) $variable = <<<'EOT' Very Long String EOT;


Are you allowed to make a question on Answers.com?

Yes, of course! Everyone is allowed to ask a question to Answers.com so long as it fits our site guidelines and Terms of Use. Visit the Related Link to the Help Center for information on how to ask a question.


In linux What is the difference between single quotes and double quotes with respect to shell interpretation?

Double quotes allow changes to the text string, including: -- substitution for variable names, such as $x; -- expansion of special characters, such as '*' or '?' within file names; -- command execution within backticks, such as "You have `ls | wc -l` files" Single quotes enclose an explict string, and prevent most of these changes.


What are character constants?

A character constant is a single character in the host's character set, such as 'A', 'a', '0', '%', etc. Note the use of the single quotes instead of double quotes. (Double quotes are used for string constants, not character constants.) A character constant maps to a specific int (integer) value, but assuming anything about that relationship is non-portable.


Why is h2co3 written in inverted commas?

There is no reason that h2co3 should be written inside of single quotation marks according to chemistry style guides. Single quotes are used for quotes within double quotation marks.


What does the foot mark look like?

A single quote is used for feet; double quotes for inches. Example : He was 6'2'' tall.


What is the purpose of using quotation's in a search?

The computer will read the words within the double quotes as being a complete sentence to search for. Without the quotes, the sentence would be treated as single words.