Writing a C program that displays your name
Here's a simple C program that displays a name:
#include
int main() {
// Displaying a name
printf("My name is John Smith.\n");
return 0;
}
In this program, we include the stdio.h
header for input and output functions. The printf
function is used to display the name "John Smith" on the screen. When you run this program, it will print "My name is John Smith." to the console. You can replace "John Smith" with your own name to display your name instead.