In this Hackerrank Playing With Characters problem, we need to develop a C Program in which we need to print the character in the first line and then we need to print the value of the variable in the next line. after that in the last line, we need to print the sentence.


Hackerrank Playing With Characters problem solution in c

Hackerrank Playing With Characters problem solution in c

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main() {
    char ch;
    char s[20], sen[100];
    scanf("%c", &ch);
    scanf("%s", s);
    scanf("\n");
    scanf("%[^\n]%*c", sen);
    printf("%c\n", ch);
    printf("%s\n", s);
    printf("%s\n", sen);
    return 0;
}