logoISU  

CS256 - Principles of Structured Design

Fall 2021

Displaying ./code/sternflCode/p7.c

#include<stdio.h>

int main() {
  char C = 'A';  // 'A' is a small integer
  printf("%c\n", C);
  printf("%d\n", C);
  char c = 'a';
  char C1 = 'B';
  char c1 = 'b';
  printf("%d %d\n", C,c);
  printf("%d %d\n", C1,c1);
  printf("%c\n", 100);
  char uc = 'Q';
  char lc = uc+32; //converts upper case to lower case in ASCIIjk
  printf("%c %c\n",uc,lc);
  //  "dog"  what is stored 'd','o','g',0
  //                                    ^ EOS end of string
  printf("%s\n","dog");
  printf("%s\n","dog"+1);
  printf("%s\n","dog"+2);
}