From: Hongli L. <h....@ch...> - 2002-05-16 12:35:40
|
Why doesn't anybody read the FAQ or use the Console App template... Add system("pause"); to the end of your main() function. Nancy Alvarez wrote: > > Can somebody help me? > > I dont`t get display the messages whith any program. For example this? > > ======================================================== > > /* Chapter 5 - Program 6 - BACKWARD.C */ > #include <stdio.h> /* Prototypes for standard Input/Output */ > #include <string.h> /* Prototypes for string operations */ > > void forward_and_backwards(char line_of_char[], int index); > > int main() > { > char line_of_char[80]; > int index = 0; > > strcpy(line_of_char, "This is a string.\n"); > > forward_and_backwards(line_of_char, index); > > return 0; > } > > > void forward_and_backwards(char line_of_char[], int index) > { > if (line_of_char[index]) > { > printf("%c", line_of_char[index]); > index++; > forward_and_backwards(line_of_char, index); > } > printf("%c", line_of_char[index]); > } > > > > > /* Result of execution > > This is a string. > > .gnirts a si sih > > */ |