Posts

Showing posts with the label ascii

ASCII

Image
ASCII codes As a high level programmer we see our laptop keyboard  as a bunch of keys with character printed on them & some special keys like , that key with windows logo alt key, ctrl key, num-lock etc using ASCII codes,  we  encode all of this character i.e., we assign a bit pattern to each of these character e.g. for  alphabetic character  'A' ≣  65(in decimal)  ≣  1000001(in binary) space        character   '  '  ≣ 32(in decimal)  ≣  0100000(in binary) Now let's run a C++ pgm that prints 'A' there are two alternatives,  we directly initialize a character with 'A' or we can initialize character with 65 #include <bits/stdc++.h> using   namespace  std; int  main(){      char  c1 =  'A' ;      char  c2 =  65 ;     cout << c1 ;     cout...