C. Generate the EXE file and execute it in the command line. No result is displayed.

Source: Internet
Author: User

Compile a C language program as follows:

# Include "stdio. H" Void main () {printf ("Welcome to C world! /N ");/* notation */}

Compile it into an EXE file and call it in the command line:

The normal display should be:

However, in many cases, the result of executing this exe program is blank:

 

This problem exists in both Turbo c2.0 and 3.0 compilation, and may also be caused by a problem in our system. The problem has not been found yet. But let's talk about the solution first!

Add a line to the previously written Program:

# Include "stdio. H" Void main () {printf ("Welcome to C world! /N ");/* notation */System ("pause ");/* This statement is used to suspend a command line */}

In this way, the following output is available for executing the EXE program again:

At this time, no matter what C program is executed, it is okay, but note that this solution is to run first every time

System ("pause ");

Related Article

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.