Write a loop that prints the first 128 ASCII values followed by the corresponding characters (see the section on characters in Chapter 2). Be aware that most of the ASCII values in the range "0..31" belong to special control characters with no standard print representation, so you might see strange symbols in the output for these values.

Respuesta :

Explanation:

Please refer to the attached image

Python Code:

Please refer to the attached image

Output:

Please refer to the attached image

Ver imagen nafeesahmed
Ver imagen nafeesahmed
Ver imagen nafeesahmed

Following are the program to print the first 128 ASCII values:

Program:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int i=1;//defining integer variable

for(i=1;i<=128;i++) //defining loop that prints the first 128 ASCII values

{

   char x=(char)i;//defining character variable that converts integer value into ASCII code value

   printf("%d=%c\n",i ,x);//print converted ASCII code value

}

   return 0;

}

Program Explanation:

  • Defining header file.
  • Defining the main method.
  • Inside the method, an integer variable "i" is declared which uses the for loop that counts 1 to 128 character values.
  • Inside the loop, a character variable "x" is declared that converts integer values into a character, and use a print method that prints converter value.

Output:

Please find the attached file.

Find out more information about the ASCII values here:

brainly.com/question/3115410

Ver imagen codiepienagoya
Ver imagen codiepienagoya
Ver imagen codiepienagoya
Ver imagen codiepienagoya