C Programming language Exercises 1-1

Source: Internet
Author: User

Practice 1-1 running the "Hello, World" program in your own system. Then deliberately remove part of the program, to see what error messages will be obtained.

The code is as follows:

#include <stdio.h>    //     contains information about the standard library.  int main ()    //     defines a function named Main, which does not accept parameter values.  {    printf ("Hello, world\n");    //     The man function calls the library function printf to display a sequence of characters.     getch ();    // Prevent the console     from flashing through, you need to accept any characters after you close the console.     return0;    //     returns a shape to the execution environment, and 0 represents a successful execution. }

Personal Understanding:

As a classic Hello, the world program, each line of code is worth thinking about, you can go to browse the Stdio.h library has those functions.

When VS2013-type code is executed, the console flashes past, and VS2013 does not join the "Enter any key off" function in VC6.0.

Resolves the issue after adding the Getch () function.

C Programming language Exercises 1-1

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.