/* compile using gcc -o ex3 -g -Wall ex3.c -m32 -fno-stack-protector ex1.c Then try: perl -e 'print "123456781234567"' | a.out */ #include void main(){ char str1[8]; char str2[8]; str1[0]='a'; str1[1]='b'; str1[2]='c'; str1[3]='d'; str1[4]='e'; str1[5]=0; gets(str2); printf("contents of str1 = %s\n", str1); printf("contents of str2 = %s\n", str2); }