Chapter I.

Source: Internet
Author: User

Experiment one, the writing Experiment of command explanation program
First, the purpose of the experiment
(1) Master the Principle of command interpretation procedure;
(2) Master the simple Dos call method;
(3) Master C language programming preliminary.
Test methods, steps and Results

#include <stdio.h>#include<stdlib.h>#include<string.h>intMain () {Charstr[ -]; printf ("Please enter a command:");  Do{gets (str); if(strcmp (str,"dir")==0) {printf ("dir indicates no parameters: View the file currently in the directory \ n"); }          Else if(strcmp (str,"CD")==0) {printf ("CD Directory Name: Enter a specific directory. \ n"); }                Else if(strcmp (str,"MD")==0) {printf ("MD Directory Name: Create a specific folder. Dos under the habit called Directory, win under the habit called folder \ n"); }                 Else if(strcmp (str,"Rd")==0) {printf ("Rd Directory Name: Deletes a specific folder. \ n"); }        Else if(strcmp (str,"CLS")==0) {printf ("CLS Directory Name: Indicates clear screen function \ n"); }                Else if(strcmp (str,"Data")==0) {printf ("Data Set Date command, function is set date \ n"); }        Else if(strcmp (str," Time")==0) {printf ("Time system Clock Settings command, function: Set or display the system period. \ n"); }                Else if(strcmp (str,"Ren")==0) {printf ("Ren means that the file is renamed, and the Ren command is in the format: the file name of the Ren source file. \ n"); }                Else if(strcmp (str,"Copy")==0) {printf ("Copy represents the Replication command, and the replication information for his features \ n"); }         Else if(strcmp (str," Help")==0) {printf ("no parameters: View files and folders in the current directory \ n"); printf ("CD Directory Name: Enter a specific directory. \ n"); printf ("MD Directory Name: Create a specific folder. Dos under the habit called Directory, win under the habit called folder) \ n"); printf ("Rd Directory Name: Deletes a specific folder. \ n"); printf ("CLS Directory Name: Indicates clear screen function \ n"); printf ("Data Set Date command, function is set date \ n"); printf ("Time system Clock Settings command, function: Set or display the system period. \ n"); printf ("Ren means that the file is renamed, and the Ren command is in the format: the file name of the Ren source file. \ n"); printf ("Copy represents the Replication command, and the replication information for his features \ n"); }        Else{printf ("you enter the wrong information, please re-enter: \ n"); }    } while(strcmp (str,"quit")==0)        return 0;}




Second, the experimental summary

It's a waste of time to read the wrong question.

Chapter I.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.