CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//Demo POC Created by Sanjay Kamath
//Note : Arrays are not dynamic
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main() {
cout <<"Length of input must be 3 \n";
char a[3];
cin>>a;
cout<<"The input string is (Either God or Devil):"<<a<<"\n";
char strc[]="God\0";
int res = strcmp(strc,a);
// printf("%d",res);
if(res==0){
printf("%s", "Heaven is a place on Earth");
}
else{
printf("%s","Hell fire awaites you !");
}
return 0;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run