Computer Science, asked by jiyamegha396, 6 months ago

what are the various types of constant used in c? explain

Answers

Answered by patelgopi018
0

Explanation:

Types of C constant:

Constant type data type (Example)

Integer constants int (53, 762, -478 etc ) unsigned int (5000u, 1000U etc) long int, long long int (483,647 2,147,483,680)

Real or Floating point constants float (10.456789) doule (600.123456789)

Octal constant int (Example: 013 /*starts with 0 */.

Answered by mugdha10
4

\huge\star\underline\mathfrak\green{Answer:-}

  • C Constants are also like normal variables. But, only difference is, their values can not be modified by the program once they are defined.
  • Constants refer to fixed values. They are also called as literals
  • Constants may be belonging to any of the data type.
  • Syntax: const data_type variable_name; (or) const data_type *variable_name;

TYPES OF C CONSTANT:

  1. Integer constants
  2. Real or Floating point constants
  3. Octal & Hexadecimal constants
  4. Character constants
  5. String constants
  6. Backslash character constants

Similar questions