Declare and Initialize the String "str" as "Hello World" - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Saturday, July 11, 2020

Declare and Initialize the String "str" as "Hello World"

Learn C programming

Question

Declare and Initialize the String "str" as "Hello World"

Input Format

1<=StringLength<=100

Sample TestCase Expected Output

Hello World


Answer

#include <stdio.h>
int main()
{
    char str[] = "Hello World";
    printf("%s",str);
    return 0;
}


Comment What problem Do you Need...

Follow Us For More...

1 comment: