Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9292673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:56:13+00:00 2026-06-18T20:56:13+00:00

I am new to C programming. In my program below, I am simply trying

  • 0

I am new to C programming. In my program below, I am simply trying to immediately, exit the C program without see any additional dialog, if the programs receives the input “quit”.

I am trying to accomplish this using exit(0); however, before the program exits it outputs something like

success
process exited with return value 0
Press any key to continue...

I am trying to avoid this dialog and exit the program immediately. Is this possible?

I appreciate any help with this.

Many thanks in advance!

My C Code:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>


int main(void)  {
    char command1[256], command2[256];
    printf("# ");
    scanf("%s", command1);
    if(strcmp(command1,"quit")==0){
        printf("success");
        exit(0);
    }else{
        printf("unknown command");
    }

system("PAUSE");
return 0;

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:56:14+00:00Added an answer on June 18, 2026 at 8:56 pm

    The message that you see is actually generated by the Visual Studio debugger. It’s not really coming from your program.

    If you would like to verify that your program is not actually displaying any message (nor waiting for a key press) just try running it from a windows command prompt. You may also try running the program in “Release” mode from withing Visual Studio. That will also confirm this.

    The reason the debugger displays that information is just to help you understand what is going on with your program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to iPhone programming, and I'm trying to make a simple program without
I'm very new to programming and I am trying to write a program that
i am new kernel programming.i have been trying to load this driver program for
I am very new to MPI programming, I am trying to run a program
I am very new to jQuery and javascript programming. I have a program below
I'm new to C++ and programming in general . I'm trying out small programs
I'm new to C programming and I just came across this program and got
I'm new to C programming. I want to create C program which can read
I'm new to C programming. I want to compile C program using Make file.
I am new to thread programming in Java. To understand threading I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.