44-Write a program to display the string and character.

Program: 44

Write a program to display the string and character.

#include
#include
void main()
{
    char c = 'h';
    char str[10] = {'E','A','S','T','E','R'};
    char str2[12] = "SCIENCE";
    printf("Character value is: %c\n", c);
    printf("\n String array value is: %s", str);
    printf("\n String 2 Value is: %s", str2);
    getch();
}
Output
Character value is: h

String array value is: EASTER

String 2 Value is: SCIENCE

Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Related Post
Leave a Comment

This website uses cookies.