C String Variable Type

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/c-string-variable-type/
PINTEREST
PINTEREST
INSTAGRAM

C Programming Tutorial Index

  1. Introduction To Programming
  2. C Setup Development Environment
  3. C Hello World and Compile First Application
  4. C Syntax and Basics
  5. C Variables
  6. C Numeric Variable Types (Integer, Long, Float)
  7. C String Variables
  8. C Constants and Define Processor
  9. C Operators
  10. C If Else and Switch Case Conditionals
  11. C While Loops
  12. C For Loops
  13. C Arrays
  14. C Functions
  15. C Structure
  16. C Union
  17. C File Operations (Open, Read, Write)
  18. C Pointers
  19. C Type Casting
  20. C Header Files and Include

String is multiple characters added together. “Hi Poftut” is a string. Actually C do not direct String type but character type is used to store single and multiple characters.

Character

Character types is defined with char keyword. Single character will hold 1 byte in the memory. Character type normally hold ASCII characters but third party libraries provides support for different character types like UTF-8, UTF-16 etc.

char mychar=’a’;

String

As stated above string is a list of character types. We can define string like below.

Previous definition will create an char array which is equal to string. Above definition may seem a little bit error prone. We can define string more practical and less error prone like below.

C Programming Tutorial Index

  1. Introduction To Programming
  2. C Setup Development Environment
  3. C Hello World and Compile First Application
  4. C Syntax and Basics
  5. C Variables
  6. C Numeric Variable Types (Integer, Long, Float)
  7. C String Variables
  8. C Constants and Define Processor
  9. C Operators
  10. C If Else and Switch Case Conditionals
  11. C While Loops
  12. C For Loops
  13. C Arrays
  14. C Functions
  15. C Structure
  16. C Union
  17. C File Operations (Open, Read, Write)
  18. C Pointers
  19. C Type Casting
  20. C Header Files and Include
RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/c-string-variable-type/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Python String Variable Type

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)