Try using exit(0);
instead. The exit
function expects an integer parameter. And don’t forget to #include <stdlib.h>
.
More Related Contents:
- Difference between pre- and postfix incrementation in C (++a and a++) [duplicate]
- How to count the number of times a while loop is executed
- please help me to find the error in this C code [closed]
- Using the pow() function with integers in C
- C pointer to array/array of pointers disambiguation
- typedef fixed length array
- What’s an object file in C?
- Ways to ASSERT expressions at build time in C
- Why does passing char** as const char** generate a warning?
- Is this a pointer to a pointer of the start of an array?
- Parameter Passing in C – Pointers, Addresses, Aliases
- Behaviour of printf when printing a %d without supplying variable name
- Calling Cython function from C code raises segmentation fault
- Unexpected output when printing directly to text video memory
- Set ALSA master volume from C code
- What is the Windows equivalent to the capabilities defined in sys/select.h and termios.h
- Printing all global variables/local variables?
- Why are LIB files beasts of such a duplicitous nature?
- c get nth byte of integer
- atoi vs atol vs strtol vs strtoul vs sscanf
- What exactly does `-rdynamic` do and when exactly is it needed?
- C multiple single line declarations
- Precision in C floats
- Representing EOF in C code?
- Inconsistent gcc diagnostic for string initialization
- “int *nums = {5, 2, 1, 4}” causes a segmentation fault
- How do I find the current machine’s full hostname in C (hostname and domain information)?
- How to cast an integer to void pointer?
- ncurses multi colors on screen
- Why does C program print 0D instead of 0? (When EOF sent as Ctrl+D) [duplicate]