Introduction to Programming

1. Now that you have learned how to print Hello World, modify this program to instruct your computer to print your name and greet you.

Ans:

Message enclosed in double quotes in a printf statement is printed as is. In order to create a program to greet you with your name, all you have to do is update the message in your hello world program.

#include <stdio.h>

int main(int argc, char * argv[]) {
    /* Update the message enclosed in double quotes in printf statement */
    printf("Hello Pragati\n");
    return 0;
}