Im trying to run a code, but I cannot successed..

Hello guys.
I just started to study C language, and the first thing I have done, was to write a simple C code on Microsoft Visual C++..
I just copy-pasted a simply code from "Wiki", compile it, and run.
The code just calculated some simple things, like avrage of some grades and etc.. unfortunatly, when I enter some values to the program, and trying to get a result, the program just closing itself(not the Microsoft visual c++, the C file that I have written..)
so I cannot see the result(in this case, I cant see the value of the avrage of grades..) the program is just writing this statement:"[3440] sucka.exe: Native' has exited with code 0 (0x0)."
someone can help me please?:


  • Normally if you are testing a simple program in windows it will close very fast in the end. You have two alternatives:
    Run the exe-file in a DOS box or add some kind of input in the end of your program like:
    (this is c)
    printf("write a single letter
    letter = getchar();

    You need #include in the beginning for c
  • still the same.. its just closing it..

  • On you have a huge amount of test programs. Try something simple like A+B and see if it works with your compiler!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!