Hello, I am currently reading book and in the following code it is supposed to output the text: "Hi, Bub"
im sure ive made a mistake but when I try to run the program*(Edit) I get segmenation fault error and no other error.
Code:
#include <stdio.h>
void printAGreeting( char* greeting ) {
printf( "%s" , greeting );
}
void printAComma( void ) {
printf( ", ");
}
void printAnAddressee( char* aName ) {
printf( "%s" );
}
void printANewLine() {
printf( "\n" );
}
void printGreeting( char* aGreeting , char* aName ) {
printAGreeting( aGreeting );
printAComma();
printAnAddressee( aName );
printANewLine();
}
int main() {
printGreeting( "Hi" , "Bub" );
return 0;
}