[ create a new paste ] login | about

Link: http://codepad.org/CIUm6t1W    [ raw code | output | fork ]

C, pasted on Oct 18:
/* Filename: C2FIRSt.C */

#include<stdio.h>
#define Bell '\a'

main()

{
	int counter=0; /*Integer variable to count through loop */

	char fname[20]; /* Character array holding name */

	printf("what is your first name? \n"); /*PROMPT FOR FIRST NAME */	
	scanf(" %s ", fname); /* Get input as string store in string fname */

	while (counter < 5)
	{
		printf("%s\n" , fname);
		counter++;
	}
	
	printf("%c", BELL);

	return;
	





}


Output:
1
2
3
4
In function 'main':
Line 22: error: 'BELL' undeclared (first use in this function)
Line 22: error: (Each undeclared identifier is reported only once
Line 22: error: for each function it appears in.)


Create a new paste based on this one


Comments: