answersLogoWhite

0


Best Answer

In C, you can assign integers multiple characters such that they fit in their size. For e.g.:

int - 4 bytes

char - 1 byte

So an assignment like this is valid:

int a = 'ABCD';

The first byte in a will be assigned the value of 'A', the second - 'B' and so on.

A string literal is a character array constant. It is enclosed in double quotes and assignment can only be made to a char pointer. There is no limit on the size of the literal and it is terminated with a null character. e.g.:

char str[] = "This is a trial";

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

character: 1

string: 1..

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between multi character constant and string literals?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between literals and variables in QBasic?

Literals are constants.


What is the difference between literals and identifiers in C plus plus?

An identifier is a sequence of characters used to denote one of the following:Object or variable nameClass, structure, or union nameEnumerated type nameMember of a class, structure, union, or enumerationFunction or class-member functiontypedef nameLabel nameMacro nameLiterals (C++)Invariant program elements are called "literals" or "constants." The terms "literal" and "constant" are used interchangeably here. Literals fall into four major categories: integer, character, floating-point, and string literals.A literal may be any of the following:integer-constant character-constant floating-constant string-literal


What is the difference between constant and non-constant motion?

Acceleration is the difference between constant and non-constant motion.


What is the difference between string type and character type constants?

A character type constant is a character, a char, while a string type is an array of characters. The character type constant is one character and is delimited by single quotes. The string type constant is zero or more characters and is delimited by double quotes.


The difference between the literals operands and the immediate operands?

Literal is a constant that is written as a part of the instruction. It avoids storing a constant in the memory and using a label for it in the instruction.the assembler generates the specified value as a constant at some other memory locatin.the address of the generated constant is used as the target address for the machine instruction. with immediate addressing, the operand value is assembled as a part of the machine instruction


Difference between rate constant and specific rate constant?

There is no difference between them they are same rate constant is another name of specific rate constant


What is the difference between habits and character?

what is the difference between character and habit


What is the difference between a constant in a graph and a constant in a experiment?

the difference between a constant in a graph and a constant in a experiment is that when on a graph, the constant is the thing that changes, and in a experiment it is the part that stays the same.


Which comma is used for characters in switch case statements?

There is only one comma, but it is not used in switch-case. Character literals are between apostrophes: 'x'


What is the difference between ordinary prism and constant deviation prism?

difference between ordinary prism and constant deviation prism


Difference between attenuation constant and phase constant?

nothing


Difference between modified constant pressure and constant volume?

bobo