3. Write a C program using an online C compiler that implements the following:-
• Declare a string; upon initialization populate the string with a phrase of your choice.
• Declare a second-string; upon initialization populate that string with a different phrase of your choice.
• Display both strings using a single printf() function call.
#include<stdio.h>
#include<conio.h>
int main()
{
char phrase1[]="He was waiting for the rain to stop.";
char phrase2[]="You might enjoy a massage.";
printf("%s\n%s\n",phrase1,phrase2);
getch();
getch();
return 0;
}
Comments
Leave a comment