Skip to content

Latest commit

 

History

History
26 lines (25 loc) · 370 Bytes

exit-status.md

File metadata and controls

26 lines (25 loc) · 370 Bytes

Exit Status

status.c

#include <cs50.h>
#include <stdio.h>

int main(int argc, string argv[])
{
    if (argc!=2)
    {
        printf("Missing command-line argument\n");
        return 1;
    }
    else
    {
        printf("hello, %s\n",argv[1]);
        return 0;
    }
}

Check exit status

make status
./status
echo $?