Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Decryption Code in c/c++. Enter 1-2 lines of code to replace /*your code here*/ to make the decryption work. undefined #include #include #include void check(int

Decryption Code in c/c++. Enter 1-2 lines of code to replace "/*your code here*/ to make the decryption work.

image text in transcribedundefined

#include #include #include void check(int argc, char* argv[]) { if (argc != 2) { puts("usage: $ ./decrypt keychar"); exit(1); } if (! isalpha(argv[1] [0])) { puts("key character must be alphabetical"); exit(1); } if (argv[1][0] != toupper(argv[1][0])) { puts("key character must be upper case"); exit(1); } } int main(int argc, char* argv[]) { check (argc, argv); char k argv[1][0]; printf("key = %c ",k); FILE* input stdin; FILE* output = stdout; char c; while ((c=getc(input)) != EOF) { /*YOUR CODE HERE*/ putc(c,output); } } #include #include #include void check(int argc, char* argv[]) { if (argc != 2) { puts("usage: $ ./decrypt keychar"); exit(1); } if (! isalpha(argv[1] [0])) { puts("key character must be alphabetical"); exit(1); } if (argv[1][0] != toupper(argv[1][0])) { puts("key character must be upper case"); exit(1); } } int main(int argc, char* argv[]) { check (argc, argv); char k argv[1][0]; printf("key = %c ",k); FILE* input stdin; FILE* output = stdout; char c; while ((c=getc(input)) != EOF) { /*YOUR CODE HERE*/ putc(c,output); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions