summaryrefslogtreecommitdiff
path: root/regress/lib/libc/alloca/alloca.c
blob: 1c2642929332baf177bc2d2fa239024fc6d10bc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*	$OpenBSD: alloca.c,v 1.4 2003/07/31 21:48:02 deraadt Exp $	*/

/*	Written by Michael Shalayeff, 2003, Public Domain.	*/

#include <stdio.h>

int
main(int argc, char *argv[])
{
	char *q, *p;

	p = alloca(41);
	strcpy(p, "hellow world");

	q = alloca(53);
	strcpy(q, "hellow world");

	exit(strcmp(p, q));
}