PLAY WITH CODING

Home Basic Program If & Else Loops Conversion Pattern logo

Basic C Program

Print HELLO WORLD in double quote and single quote

Input - Output

Output
" HELLO WORLD "

' HELLO WORLD '

Algorithm

Step 1: START

Step 2: Print \" HELLO WORLD \".

Step 2: Print \' HELLO WORLD \'.

Step 3: END

CODE


/* Print "Hello World" in double quote*/

#include  <stdio.h>
int main()
{
      printf(" \" HELLO WORLD \" ");
      printf("\n");
/* Print 'Hello World' in single quote*/

      printf("\' HELLO WORLD \' ");
      return 0;
}


/* Print "HELLO WORLD" in double quote */

#include  <iostream>
using namespace std;
int main()
{
      cout<<" \" HELLO WORLD \" ";
      cout<<"\n";
/* Print 'Hello World' in single quote*/

      cout<<"\' HELLO WORLD \' ";
      return 0;
}

OutPut

" HELLO WORLD "
' HELLO WORLD '