Write a program PROG1ASM that will 1 Output a prompt chatact

Write a program PROG1.ASM that will 1. Output a prompt chatacter \'?\' 2. Input a single character 3. echo the next character in the ASCII sequence on the next 2 lines Assemble and link your program to create PROG1.EXE. An example of a program run is: C>PROG1 ?A B B C>

Solution

#include int main() { char c; printf(“?”); printf(\"\ Enter a character: \"); // Reads character input from the user scanf(\"%c\", &c); // %d displays the integer value of a character // %c displays the actual character printf(\"\ ASCII value of %c = %d\", c, c); return 0; }
Write a program PROG1.ASM that will 1. Output a prompt chatacter \'?\' 2. Input a single character 3. echo the next character in the ASCII sequence on the next

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site