Escape the quotes with backslashes:
printf("She said \"time flies like an arrow, but fruit flies like a banana\".");
There are special escape characters that you can use in string literals, and these are denoted with a leading backslash.
More Related Contents:
- What does the symbol \0 mean in a string-literal?
- Rules for C++ string literals escape character
- String Literal address across translation units [duplicate]
- How to (un)escape strings in C/C++?
- Escaping a C++ string
- Does C support raw string literals?
- When did C++ compilers start considering more than two hex digits in string literal character escapes?
- Where are string literals stored, and can I modify them?
- cannot convert ‘std::string’ to ‘char**’ for argument ‘1’ to ‘__ssize_t getline(char**, size_t*, FILE*)’
- Why when i add number to string it shows random text in c++?
- How do I iterate over cin line by line in C++?
- Converting std::__cxx11::string to std::string
- Will std::string always be null-terminated in C++11?
- What’s the rationale for null terminated strings?
- Sizeof string literal
- How to reverse an std::string? [duplicate]
- Why can’t I write to a string literal while I *can* write to a string object?
- Are there any better methods to do permutation of string?
- How to get the number of characters in a std::string?
- How do I replace all instances of a string with another string?
- C++ Remove punctuation from String
- String literals not allowed as non type template parameters
- C++ convert integer to string at compile time
- C++ function to count all the words in a string
- Why doesn’t std::string provide implicit conversion to char*?
- Convert double to string C++? [duplicate]
- Convert string with explicit escape sequence into relative character
- C -> sizeof string is always 8
- string::size_type instead of int
- How to convert a string of hex values to a string?