diff --git a/Assignment-09/New Text Document (2).txt b/Assignment-09/New Text Document (2).txt new file mode 100644 index 0000000..e69de29 diff --git a/Assignment-09/New Text Document.txt b/Assignment-09/New Text Document.txt new file mode 100644 index 0000000..98ec138 --- /dev/null +++ b/Assignment-09/New Text Document.txt @@ -0,0 +1,14 @@ +#include + +int main(int argc, char *argv[]) { + // Check if the number of arguments is correct + if (argc != 3) { + printf("Usage: ./assignment9 Firstname Lastname\n"); + return 1; // Return an error code + } + + // Print the welcome message + printf("Hello, %s %s\n", argv[1], argv[2]); + + return 0; // Return success +} diff --git a/Assignment-09/assign9.c b/Assignment-09/assign9.c new file mode 100644 index 0000000..98ec138 --- /dev/null +++ b/Assignment-09/assign9.c @@ -0,0 +1,14 @@ +#include + +int main(int argc, char *argv[]) { + // Check if the number of arguments is correct + if (argc != 3) { + printf("Usage: ./assignment9 Firstname Lastname\n"); + return 1; // Return an error code + } + + // Print the welcome message + printf("Hello, %s %s\n", argv[1], argv[2]); + + return 0; // Return success +}