Top 10 Programming Language to learn in 2023

Are you a programming enthusiast looking to stay ahead of the curve in 2023? With the ever-evolving tech landscape, keeping up with the Best Programming Language to learn can be a daunting task. Fear not, as we have compiled a list of the top 10 Programming Languages that you should consider learning in 2023. Python: This versatile language continues to dominate in 2023, with its ease of use, readability, and a vast library of modules. JavaScript: As web development grows increasingly popular, JavaScript remains a crucial player, with its ability to create dynamic and interactive web pages. Java: This language has stood the test of time and remains a popular choice for enterprise software development. C++: A staple in the gaming and systems development industries, C++ offers exceptional performance and memory management. Swift: Apple's preferred language for iOS app development, Swift continues to grow in popularity with its simplicity and reliability. R: As data science and machin

Constant in C Programming | C Programming

Constants in C Programming

Constants in C refer to fixed values that do not change during the execution of a program. const is the keyword and it’s used to declare constants. A constant value is one that does not change during the execution of a program.

C supports several types of constants.

  • Integer Constants
  • Real Constants
  • Single Character Constants
  • String Constants

A constant value is one that does not change during the execution of a program. C supports several types of constants.

  • Integer Constants
  • Real Constants
  • Single Character Constants
  • String Constants

Integer Constants:

An integer constant is a sequence of digits. There are 3 types of integers namely decimal integers, octal integers, and hexadecimal integers.

Decimal Integers:

Consists of a set of digits 0 to 9 preceded by an optional + or - sign. Spaces, commas, and non-digit characters are not permitted between digits. Examples of valid decimal integer constant are:

  • 123
  • -31
  • 0
  • 562321
  • + 78

Some examples of invalid integer constants are:

  • 15 750
  • 20,000
  • Rs. 1000

Octal Integers: 

Constant consists of any combination of digits from 0 through 7 with an O at the beginning. Some examples of octal integers are:

  • O26
  • O
  • O347
  • O676

Hexadecimal integer:

Constant is preceded by OX or Ox, they may contain alphabets from A to F or a to f. The alphabets A to F refer to 10 to 15 in decimal digits. Examples of valid hexadecimal integers are:

  • OX2
  • OX8C
  • OXbcd
  • Ox

Real Constants:

Real Constants consist of a fractional part in their representation. Integer constants are inadequate to represent quantities that vary continuously. These quantities are represented by numbers containing fractional parts like 26.082. Examples of real constants are:

0.0026 -0.97 435.29 +487.0

Real Numbers can also be represented by exponential notation. The general form for exponential notation is mantissa exponent. The mantissa is either a real number expressed in decimal notation or an integer. An exponent is an integer number with an optional plus or minus sign.

A Single Character constant represents a single character that is enclosed in a pair of quotation symbols.

Example for character constants are:

'5' 'x' ';' ' '

All character constants have an equivalent integer value which is called ASCII Values.

String Constants:

A string constant is a set of characters enclosed in double quotation marks. The characters in a string constant sequence may be an alphabet, number, special character, and blank space. Examples of string constants are

  • "1234"
  • "God Bless"
  • "!.....?"

Backslash Character Constants [Escape Sequences]

Backslash character constants are special characters used in output functions. Although they contain two characters, they represent only one character. Given below is the table of escape sequence and their meanings. 

Constant

Meaning

\a

Audible Alert (Bell)

\f

Form Feed

\n

New Line

\r

Carriage Return

\t

Horizontal Tab

\v

Vertical Tab

\"

Double Quote

\?

Question Mark

\\

Back Slash

\0

Null

\b

Backspace

\'

Single Quote

Comments

Popular posts from this blog

C program to Find Cartesian Product of Two Sets | C programming

Array in C Programming | C Programming

What is System? | SAD