Here is a small step forward. In this chapter you learned about integers and the type
int. The 'C' can also represent uppercase letters, lowercase letters and a large
variety of special symbols. The 'C' uses small integers internally to represent
each different character. The character set that uses a computer and
representations of whole numbers corresponding to those characters is called set
character of the computer. You can print the whole number equal to the capitalized
A, for example, executing the statement
printf ("% d", 'A');
Write a C program that prints the integer equivalents of some letters
uppercase letters, lowercase letters and special symbols. At a minimum, determine the numbers
equivalent to the entire set following: BCabc 0 $ 12 * + / and space character
white.
Write a program that receives input from a five-digit number, separate the number digits in their components and print them from one another by three spaces. For example, if the user enters 42339, the program must write 4 2 3 3 9
#include <stdio.h>
#include <stdlib.h>
#define String "42339"
main(){
int i;
char *cp;
cp = String;
while(*cp != 0){
putchar(*cp);
printf(" ");
cp++;
}
putchar('\n');
exit(EXIT_SUCCESS);
}
const char buf[32] = "Chicken shit"; char *ptr = buf; ptr[7] = '-';
#include <stdio.h>
#include <stdlib.h>
main(){
int i;
char *cp;
cp = "42339";
while(*cp != 0){
putchar(*cp);
printf(" ");
cp++;
}
putchar('\n');
exit(0);
}
#include <stdio.h>
#include <stdlib.h>
main(){
int i=0;
char cp[6] = "42339";
while(cp[i] != 0){
putchar(cp[i]);
printf(" ");
i++;
}
putchar('\n');
exit(0);
}