ch1-quotes (Equivalent forms)

Chapter_1     Exercise_1-2 Temperature_Programs     Exercise_1-3







quotes.c         download


#include <stdio.h> // for putchar(), printf()
// single and double quotes
int main()
{ // equivalent chars: '"' and '\"', and strings: "'" and "\'"
printf("'\"': "); putchar('"'); printf("\t \"'\": "); printf("'\n");
printf("'\\\"': "); putchar('\"'); printf("\t \"\\'\": "); printf("\'\n");

return 0;
}
/*
gcc quotes.c -o quotes
./quotes
'"': " "'": ' // quotes as a char, apostrophe in a string
'\"': " "\'": ' // escaped quotes as a char, escaped apostrophe in a string
*/









Chapter_1     Exercise_1-2 BACK_TO_TOP Temperature_Programs     Exercise_1-3



Comments

Popular posts from this blog

Contents

Blogger Page Margins in Contempo