Characters and Character Sets tMyn1 Characters and Character Sets The characters that can be used are the upper and lower case letters, A to Z and a to.

Slides:



Advertisements
Similar presentations
Constants, Variables, and Data Types
Advertisements

Advanced Input, Process and Output Commands Session 3.
Introduction to C++ Programming. A Simple Program: Print a Line of Text // My First C++ Program #include int main( ) { cout
Introduction to C++ September 12, Today’s Agenda Quick Review Check your programs from yesterday Another Simple Program: Adding Two Numbers Rules.
Getting Started with C# 1 SWE 344 Internet Protocols & Client Server Programming.
Introduction to C Programming CE Lecture 2 Basics of C programming.
1 Character Processing How characters can be treated as small integers? How characters are stored and manipulated in a machine? How use is made of certain.
Overview of C++ Chapter 2 in both books programs from books keycode for lab: get Program 1 from web test files.
Characters and Strings. Characters In Java, a char is a primitive type that can hold one single character A character can be: –A letter or digit –A punctuation.
C programming Language and Data Structure For DIT Students.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
Variable & Constants. A variable is a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines.
Basic Input - Output. Output functions  printf() – is a library function that displays information on-screen. The statement can display a simple text.
Chapter 2: C Fundamentals Dr. Ameer Ali. Overview C Character set Identifiers and Keywords Data Types Constants Variables and Arrays Declarations Expressions.
Bell Ringer What types are numbers are there is the python programming language?
Aloha Aloha What you see: What the computer sees: binary number columns binary number columns
C How to Program, 6/e © by Pearson Education, Inc. All Rights Reserved.
A Variable is symbolic name that can be given different values. Variables are stored in particular places in the computer ‘s memory. When a variable is.
Input & Output: Console
C-Language Keywords(C99)
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
Constants in C A Presentation On Department of Computer & Information Technology, M.S.P.V.L. Polytechnic College, Pavoorchatram.
Week 1 Algorithmization and Programming Languages.
C++ Character Set It is set of Characters/digits/symbol which is valid in C++. Example – A-Z, (white space) C++ Character Set It is set of.
Characters. Character Data char data type – Represents one character – char literals indicated with ' '
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
At the end of the module the students should be able to:  Familiarize themselves with the different uses of constants, operators, and expressions in.
GREP. Whats Grep? Grep is a popular unix program that supports a special programming language for doing regular expressions The grammar in use for software.
3. FORMATTED INPUT/OUTPUT. The printf Function The first argument in a call of printf is a string, which may contain both ordinary characters and conversion.
(A Very Short) Introduction to Shell Scripts CSCI N321 – System and Network Administration Copyright © 2000, 2003 by Scott Orr and the Trustees of Indiana.
DATA TYPE AND DISPLAY Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 9, 2005 Lecture Number: 6.
Constants, Variables and Data types in C The C character Set A character denotes any alphabet, digit or special symbol used to represent information.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
Topics to be covered  Introduction to C Introduction to C  Characterstics of C Characterstics of C  Characterset Characterset  Keywords Keywords 
Structured Programming (4 Credits) HNDIT Week 2 – Learning Outcomes Design an algorithmic solution for simple problem such as computation of a factorial,
Programming Fundamentals. Summary of previous lectures Programming Language Phases of C++ Environment Variables and Data Types.
Ajmer Singh PGT(IP) Programming Fundamentals. Ajmer Singh PGT(IP) Java Character Set Character set is a set of valid characters that a language can recognize.
1 Comments Allow prose or commentary to be included in program Importance Programs are read far more often than they are written Programs need to be understood.
Operating System Discussion Section. The Basics of C Reference: Lecture note 2 and 3 notes.html.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
Characters and Strings
JavaScript and Ajax (JavaScript Data Types) Week 2 Web site:
Another example of input import java.io.*; //import java.lang.Integer.*; class ExampleofInput2 { private static BufferedReader stdin = new BufferedReader(
17-Mar-16 Characters and Strings. 2 Characters In Java, a char is a primitive type that can hold one single character A character can be: A letter or.
Java Tokens Token A java program contains numbers of classes,
CMPE-013/L: “C” Programming Gabriel Hugh Elkaim – Spring 2012 CMPE-013/L Constants and Literals Gabriel Hugh Elkaim Spring 2012.
BIL 104E Introduction to Scientific and Engineering Computing Lecture 2.
Introduction to C Programming I Subject: T0016 – ALGORITHM AND PROGRAMMING Year: 2013.
Basics of ‘ C ’ By Gaikwad Varsha P. Asst. Prof. Information Technology Dept. Govt. College of Engg. Aurangabad.
C++ First Steps.
Chapter 3 Data Representation Text Characters
Binary 1 Basic conversions.
Character Processing How characters can be treated as small integers?
ECE Application Programming
Wel come.
Data Encoding Characters.
Representing Nonnumeric Data
Javascript, Loops, and Encryption
Representing Characters
C++ Basics.
Escape Sequences Some Java escape sequences: See Roses.java (page 68)
Basics of ‘C’.
Requirements for coding in Assembly Language
Character Processing How characters can be treated as small integers?
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
Learning Intention I will learn how computers store text.
Python Lessons 7 & 8 Mr. Kalmes.
The Fundamentals of C++
Presentation transcript:

Characters and Character Sets tMyn1 Characters and Character Sets The characters that can be used are the upper and lower case letters, A to Z and a to z, the digits 0 to 9, the space character, the control characters for new line, horizontal and vertical tabs, form feed and bell, plus the following special characters: _ { } [ ] # ( ) % : ;. ? * + - / ^ & | ~ ! =, \ ” ’ Those above are also referred to as symbols.

Characters and Character Sets tMyn2 The above definition of the characters that are used in C++ does not say how the characters are encoded. On a PC, these characters will typically be represented in the machine by 8-bit extended ASCII codes. Control characters can be entered by means of an escape sequence. An escape sequence is an indirect way of specifying a character, and always begins with a backslash.

Characters and Character Sets tMyn3 Escape SequenceControl Character \nnewline \thorizontal tab \vvertical tab \bbackspace \rcarriage return \fform feed \aalert-bell

Characters and Character Sets tMyn4 There are some other characters that are a problem to represent directly. For example since the backslash signals the start of an escape sequence, the only way to enter a backslash as a character constant is by using two successive backslashes:

Characters and Character Sets tMyn5 Escape SequenceCharacter \\backslash \’single quote \”double quote \?question mark