File: rogers_example06.c

package info (click to toggle)
lg-issue41 2-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,724 kB
  • ctags: 156
  • sloc: makefile: 36; ansic: 8; sh: 4
file content (34 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>
#include <assert.h>

/*

	This program is written to demonstrate the <stdlib.h> library.

	This program will demonstrate the assert function

	Written by James M. Rogers

	12 April 1999

	Released to the Public Domain on this date.

*/

/*

    Compile this with the -DNDEBUG flag in order to _NOT_

    compile the assert statement.

    So all production boxes should compile with the -DNDEBUG flag.

*/

main (){

    int i=1;
    int j=0;
    assert(j!=0);
    printf("%s\n", i/j);
}