How to add single and double quotes to a string in C

1 Answer

0 votes
#include <stdio.h>

int main() {
    char str[] = "\"It's a nice option!\" Save us some time.";
    
    printf("%s\n", str);
    
    return 0;
}


 
/*
run:
 
"It's a nice option!" Save us some time.
 
*/

 



answered Mar 11, 2025 by avibootz

Related questions

1 answer 89 views
1 answer 80 views
1 answer 117 views
4 answers 174 views
1 answer 89 views
3 answers 301 views
1 answer 177 views
...