Answer to Question #286615 in C++ for PATS

Question #286615

Quotation marks are usually paired with a similar type, like a double quote (") paired with another double quote ("), and the same goes for single quotes ('). However, I'd like to try complicating things by putting together a pair of a double quote(") and a single quote(') in one statement!


Can you do this simple challenge?


Output

A line containing a string.

"'




1
Expert's answer
2022-01-12T05:10:31-0500
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>

using namespace std;


/*
	Quotation marks are usually paired with a similar type, like a double quote (") paired with another double quote ("), 
	and the same goes for single quotes ('). 
	However, I'd like to try complicating things by putting together a pair of a 
	double quote(") and a single quote(') in one statement!
*/
int main()
{
	char SQ = 0x27, DQ=0x22;
	
	//SQ --> Single Quote (')
	//DQ --> Double Quote(")	
	printf("Hello World %c%c",DQ,SQ);
	return(0);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment