Deitel & Deitel, C How to Program 6th Edition, Exercise 9.14 (Escape Sequences)

// 9.14 (Escape Sequences)

#include <stdio.h>

int main() {
printf("abc\'def"); // how to print '
printf("\n\n\n");

printf("abc\"def"); // how to print "
printf("\n\n\n");

printf("abc\?def"); // how to print ?
printf("\n\n\n");

printf("abc\\def"); // how to print backslash
printf("\n\n\n");

printf("abc\adef"); // alert
printf("\n\n\n");

printf("abc\bdef"); // backspace
printf("\n\n\n");

printf("abc\ndef"); // newline
printf("\n\n\n");

printf("abc\rdef"); // carriage return
printf("\n\n\n");

printf("abc\tdef"); // horizontal tab
printf("\n\n\n");

printf("\n\n\n");
return 0;
}

OUTPUT

abc'def


abc"def


abc?def


abc\def


abcdef


abdef


abc
def


def


abc     def






Press any key to continue . . .

Comments

Popular posts from this blog

Deitel & Deitel, C How to Program 6th Edition, Exercise 6.23 (Turtle Graphics)

Deitel & Deitel, C How to Program 6th Edition, Exercise 6.22 (Total Sales)

Deitel & Deitel, C How to Program 6th Edition, Exercise 5.47 (Craps Game Modification)