C Programming Language
  • Home
  • C Fundamentals
    • C Character Set
    • Tokens>
      • Keywords
      • Identifiers
      • Constants>
        • Definition and Its types
        • Numeric Constants>
          • Integer Constants
          • Real Constants
        • Character Constants
        • String Constants
        • Backslash Character
      • Operators>
        • Definition and Its types
        • Arithmetic
        • Relational
        • Logical
        • Increment
        • Decrement
        • Assignment
        • Arithmetic Assignment
        • Conditional
        • Bitwise
        • Special Operators
        • Hierarchy
    • Data Types>
      • Primary (Or) Basic
      • User-Defined
      • Derived
    • Variable>
      • Definition
      • Declaration
      • Initialization
  • Control Structures
    • Decision-Control>
      • If Statement>
        • Simple-if Statement
        • if-else Statement
        • Nested-if Statement
        • if-else ladder Statement
      • Switch Statement
    • Loop Control>
      • For
      • While
      • Do-While
  • Arrays
    • Introduction
    • Single-Dimensional>
      • Definition
      • Declaration
      • Initialization
    • Two-Dimensional>
      • Definition
      • Declaration
      • Initialization
    • Multi-Dimensional>
      • Definition
      • Declaration
      • Initialization
  • Functions
    • Definition
    • Standard Library Character Functions
    • Standard Library String Functions
    • Storage Classes>
      • Definition
      • Automatic
      • Register
      • Static
      • External
  • Pointers
  • Files
    • Concepts
    • Data Files and its Categories
    • Standard Files and its Categories
  • University Questions
    • April 2001 To 2005
    • April 2006 To 2010
    • April 2011 To 2015
    • November 2001 To 2005
    • November 2006 To 2010
    • November 2011 To 2015

Character:    A character denotes an alphabet, digit or a special character.

Single Character constants:   A single character constant or character constant is a single alphabet, a single digit or a single special symbol enclosed within single inverted commas. Both the inverted commas should point to the left.

For example, ۥAۥ is a valid character constant whereas ‛Aۥ is not. Note that the character constant ۥ 5ۥ is not the same as the number 5.

Valid Character Constants:                             ۥmۥ           ۥ=ۥ            ۥAۥ

ۥInvalid:                                                                 ۥ123ۥ        -     Length should be 1
                                                                               "A"           -     Enclosed in single quotes  

Note: - Each single character constant has an integer value that is determined by the computer’s particular character set.

Rules for Constructing Single Character constants

1.     A single character constant or character constant is a single alphabet, a single digit or a single special symbol enclosed within single inverted commas. Both the
        inverted commas should point to the left.

2.    The maximum length of a single character constant can be one character.

3.    Each character constant has an integer value that is determined by the computer’s particular character set.

Questions
  1. Define Character (Or) What is a character?
  2. What is a Single Character Constant? Give valid and Invalid constants?
  3. State the rules for constructing single character constants.

Powered by Create your own unique website with customizable templates.