TheSuyog
unread,Mar 2, 2011, 3:47:52 AM3/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Knowledge Test
int, float & char and array, struct, union & enum are primary and
secondary "data types" respectively not constants.
Types of constants are:
1. Integer constants: ordinary integer numbers including decimal
(1234), octal and hexadecimal (0x1234) representations,
2. Floating point constants,
3. Character constants,
4. String constants: actually arrays of characters ("Hello").
These are actually the literal values that we assign to a variable.
Ex.: int a = 123; here int is data type, a is variable name, and 123
is integer constant.
Similarly for char a = 'a';
float a = 1.234;
char a[] = "asdf"; or char a[] = {'a', 'b', 'c'};