Skip to content

Instantly share code, notes, and snippets.

@doevelopper
Last active October 26, 2023 20:39
Show Gist options
  • Save doevelopper/5286f7d8298ad9cfa1f0eb4665d67d3d to your computer and use it in GitHub Desktop.
Save doevelopper/5286f7d8298ad9cfa1f0eb4665d67d3d to your computer and use it in GitHub Desktop.
raw character in c
https://stackoverflow.com/questions/24850244/does-c-support-raw-string-literals
-std=gnu11
https://learn.microsoft.com/en-us/cpp/cpp/string-and-character-literals-cpp?view=msvc-170
printf(R"(hello\nworld\n)");

#include <stdio.h>

int main(void)

{
  printf(R"(.C with a Capital C file format does not support raw string )");
  printf("\n");
  printf(R"(.c with a small c file format does support raw string )");
  printf("\n");
  printf(R"( Raw string did not support \n new line )");
  printf("\n");

  printf(
      R"(More reading material at - https: // en.wikipedia.org/wiki/String_literal#Raw_strings;)");
  printf("\n");
  printf(
      R"(More reading material at - https: // en.wikipedia.org/wiki/String_literal;)");
  printf("\n");
  printf(
      R"(More reading material at - https://stackoverflow.com/questions/24850244/does-c-support-raw-string-literals;)");
  printf("\n");
  printf(
      R"(More reading material at - https: // learn.microsoft.com/en-us/cpp/c-language/c-string-literals?view=vs-2019)");
  printf("\n");
  printf(
      R"(More reading material at-https: // learn.microsoft.com/en-us/cpp/c-language/string-literal-concatenation?view=vs-2019)");
  printf("\n");
  /// Raw string.

    printf(R"(More reading material at - https://www.geeksforgeeks.org/const-qualifier-in-c/;)");
  printf("\n");
  
  
  return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment